You are here

function bibcite_entity_entity_view_alter in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x modules/bibcite_entity/bibcite_entity.module \bibcite_entity_entity_view_alter()

Implements hook_entity_view_alter().

Override fields titles.

File

modules/bibcite_entity/bibcite_entity.module, line 440
Module hooks.

Code

function bibcite_entity_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
  if ($entity
    ->getEntityTypeId() == 'bibcite_reference') {

    /* @var \Drupal\bibcite_entity\UIOverrideProvider $override_provider */
    $override_provider = \Drupal::service('bibcite.ui_override_provider');
    $override_provider
      ->referenceViewFieldsOverride($build, $entity
      ->bundle());
  }
}