Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FieldLayoutHooks.php

function FieldLayoutHooks::entityViewAlter

Implements hook_entity_view_alter().

File

core/modules/field_layout/src/Hook/FieldLayoutHooks.php, line 57

Class

FieldLayoutHooks
Hook implementations for field_layout.

Namespace

Drupal\field_layout\Hook

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal