protected function TermRenderController::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.

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

string $langcode: (optional) For which language the entity should be prepared, defaults to the current content language.

Overrides EntityRenderController::alterBuild

File

drupal/core/modules/taxonomy/lib/Drupal/taxonomy/TermRenderController.php, line 50
Definition of Drupal\taxonomy\TermRenderController.

Class

TermRenderController
Render controller for taxonomy terms.

Namespace

Drupal\taxonomy

Code

protected function alterBuild(array &$build, EntityInterface $entity, $view_mode, $langcode = NULL) {
  parent::alterBuild($build, $entity, $view_mode, $langcode);
  $build['#attached']['css'][] = drupal_get_path('module', 'taxonomy') . '/taxonomy.css';
}