You are here

public function PanelizerEntityInterface::alterBuild in Panelizer 8.3

Same name and namespace in other branches
  1. 8.5 src/Plugin/PanelizerEntityInterface.php \Drupal\panelizer\Plugin\PanelizerEntityInterface::alterBuild()
  2. 8.4 src/Plugin/PanelizerEntityInterface.php \Drupal\panelizer\Plugin\PanelizerEntityInterface::alterBuild()

Alter the built entity view in an entity specific way before rendering.

This is useful for adding things like contextual links.

Parameters

array $build: The render array that is being created.

\Drupal\Core\Entity\EntityInterface $entity: The entity to be prepared.

\Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant $panels_display: The Panels display used to render this entity.

string $view_mode: The view mode that should be used to prepare the entity.

1 method overrides PanelizerEntityInterface::alterBuild()
PanelizerEntityBase::alterBuild in src/Plugin/PanelizerEntityBase.php
Alter the built entity view in an entity specific way before rendering.

File

src/Plugin/PanelizerEntityInterface.php, line 54

Class

PanelizerEntityInterface
Defines an interface for Panelizer entity plugins.

Namespace

Drupal\panelizer\Plugin

Code

public function alterBuild(array &$build, EntityInterface $entity, PanelsDisplayVariant $panels_display, $view_mode);