You are here

protected function PanelizerEntityViewBuilder::getPanelizerPlugin in Panelizer 8.5

Same name and namespace in other branches
  1. 8.3 src/PanelizerEntityViewBuilder.php \Drupal\panelizer\PanelizerEntityViewBuilder::getPanelizerPlugin()
  2. 8.4 src/PanelizerEntityViewBuilder.php \Drupal\panelizer\PanelizerEntityViewBuilder::getPanelizerPlugin()

Get the Panelizer entity plugin.

Return value

\Drupal\panelizer\Plugin\PanelizerEntityInterface|FALSE

1 call to PanelizerEntityViewBuilder::getPanelizerPlugin()
PanelizerEntityViewBuilder::buildPanelized in src/PanelizerEntityViewBuilder.php
Build the render array for a single panelized entity.

File

src/PanelizerEntityViewBuilder.php, line 127

Class

PanelizerEntityViewBuilder
Entity view builder for entities that can be panelized.

Namespace

Drupal\panelizer

Code

protected function getPanelizerPlugin() {
  if (!isset($this->panelizerPlugin)) {
    if (!$this->panelizerManager
      ->hasDefinition($this->entityTypeId)) {
      $this->panelizerPlugin = FALSE;
    }
    else {
      $this->panelizerPlugin = $this->panelizerManager
        ->createInstance($this->entityTypeId, []);
    }
  }
  return $this->panelizerPlugin;
}