We want to support all core content entity types!

This issue is to add a 'PanelizerEntity' plugin to provide support for 'media' entities.

Here's a rough idea of the process:

  • Create the plugin class in src/Plugin/PanelizerEntity/ directory
  • See src/Plugin/PanelizerEntity/PanelizerNode.php for an example!
  • If the entity has a 'view_builder', look at it's code for anything that makes the entity special
  • If this entity needs any special blocks for it's default display, for example, like the 'node links' block, create issues in the CTools queue (so Page Manager could use them, if it wanted)
  • Check for a hook_entity_extra_field_info() which could have some things that need special blocks
  • Check for a hook_ENTITY_TYPE_view_alter() for other rendering wierdness we might need to replicate
  • Check the support code in Panelizer for D7 (and CTools for D7, for special blocks) to see if we did anything special there that makes sense in D8 too

Comments

jefuri created an issue. See original summary.

jefuri’s picture

jefuri’s picture

Status: Active » Needs review
StatusFileSize
new4.93 KB

First draft for the support of the media entity, based it mostly on the taxonomy term version of a panelizer plugin.

I dit not add the file media type as a part of the setup of the functional test because the media module already creates this when it is enabled.

Status: Needs review » Needs work

The last submitted patch, 3: panelizer-media_entity_support-2933800-3.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jefuri’s picture

Status: Needs work » Needs review
StatusFileSize
new0 bytes
new5.06 KB

Test failed because of missing bundle, added the creation of the media type within the test now.

Status: Needs review » Needs work

The last submitted patch, 5: panelizer-media_entity_support-2933800-4.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jefuri’s picture

That wasn't the reason, should have checked the errors better.
The issue was the wrong naming of the entity key for the media type bundle. I used type, should be bundle.

jefuri’s picture

Status: Needs work » Needs review
hctom’s picture

Status: Needs review » Reviewed & tested by the community

I just applied the patch from #7 - applied cleanly to 8.x-4.1 and so far no problems with it ;) Looks good and I'd really like to see this merged.