function field_layout_entity_view_alter

Same name in other branches
  1. 8.9.x core/modules/field_layout/field_layout.module \field_layout_entity_view_alter()
  2. 10 core/modules/field_layout/field_layout.module \field_layout_entity_view_alter()
  3. 11.x core/modules/field_layout/field_layout.module \field_layout_entity_view_alter()

Implements hook_entity_view_alter().

File

core/modules/field_layout/field_layout.module, line 51

Code

function field_layout_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
    if ($display instanceof EntityDisplayWithLayoutInterface) {
        \Drupal::classResolver(FieldLayoutBuilder::class)->buildView($build, $display);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.