protected function TermViewBuilder::alterBuild in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/taxonomy/src/TermViewBuilder.php \Drupal\taxonomy\TermViewBuilder::alterBuild()
Specific per-entity building.
Parameters
array $build: The render array that is being created.
\Drupal\Core\Entity\EntityInterface $entity: The entity to be prepared.
\Drupal\Core\Entity\Display\EntityViewDisplayInterface $display: The entity view display holding the display options configured for the entity components.
string $view_mode: The view mode that should be used to prepare the entity.
Overrides EntityViewBuilder::alterBuild
File
- core/
modules/ taxonomy/ src/ TermViewBuilder.php, line 22 - Contains \Drupal\taxonomy\TermViewBuilder.
Class
- TermViewBuilder
- Render controller for taxonomy terms.
Namespace
Drupal\taxonomyCode
protected function alterBuild(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) {
parent::alterBuild($build, $entity, $display, $view_mode);
$build['#contextual_links']['taxonomy_term'] = array(
'route_parameters' => array(
'taxonomy_term' => $entity
->id(),
),
'metadata' => array(
'changed' => $entity
->getChangedTime(),
),
);
}