function panopoly_pages_get_panelizer_entity in Panopoly Pages 8.2
Gets the Panelizer entity from a Panels display.
Parameters
\Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant $panels_display: The Panels display.
Return value
\Drupal\Core\Entity\EntityInterface|null The entity if this is a Panelizer display; NULL otherwise.
2 calls to panopoly_pages_get_panelizer_entity()
File
- ./
panopoly_pages.module, line 19 - Hook implementations for Panopoly Pages.
Code
function panopoly_pages_get_panelizer_entity(PanelsDisplayVariant $panels_display) {
$contexts = $panels_display
->getContexts();
if (isset($contexts['@panelizer.entity_context:entity'])) {
return $contexts['@panelizer.entity_context:entity']
->getContextValue();
}
}