function field_layout_entity_view_alter in Drupal 8
Same name and namespace in other branches
- 9 core/modules/field_layout/field_layout.module \field_layout_entity_view_alter()
- 10 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 - Provides hook implementations for Field Layout.
Code
function field_layout_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
if ($display instanceof EntityDisplayWithLayoutInterface) {
\Drupal::classResolver(FieldLayoutBuilder::class)
->buildView($build, $display);
}
}