You are here

public function PanelizerEntityBase::alterBuild in Panelizer 8.5

Same name and namespace in other branches
  1. 8.3 src/Plugin/PanelizerEntityBase.php \Drupal\panelizer\Plugin\PanelizerEntityBase::alterBuild()
  2. 8.4 src/Plugin/PanelizerEntityBase.php \Drupal\panelizer\Plugin\PanelizerEntityBase::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.

Overrides PanelizerEntityInterface::alterBuild

3 calls to PanelizerEntityBase::alterBuild()
PanelizerNode::alterBuild in src/Plugin/PanelizerEntity/PanelizerNode.php
Alter the built entity view in an entity specific way before rendering.
PanelizerTerm::alterBuild in src/Plugin/PanelizerEntity/PanelizerTerm.php
Alter the built entity view in an entity specific way before rendering.
PanelizerUser::alterBuild in src/Plugin/PanelizerEntity/PanelizerUser.php
Alter the built entity view in an entity specific way before rendering.
3 methods override PanelizerEntityBase::alterBuild()
PanelizerNode::alterBuild in src/Plugin/PanelizerEntity/PanelizerNode.php
Alter the built entity view in an entity specific way before rendering.
PanelizerTerm::alterBuild in src/Plugin/PanelizerEntity/PanelizerTerm.php
Alter the built entity view in an entity specific way before rendering.
PanelizerUser::alterBuild in src/Plugin/PanelizerEntity/PanelizerUser.php
Alter the built entity view in an entity specific way before rendering.

File

src/Plugin/PanelizerEntityBase.php, line 111

Class

PanelizerEntityBase
Base class for Panelizer entity plugins.

Namespace

Drupal\panelizer\Plugin

Code

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

  // By default, do nothing!
}