function EntityViewDisplay::build

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php \Drupal\Core\Entity\Entity\EntityViewDisplay::build()
  2. 8.9.x core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php \Drupal\Core\Entity\Entity\EntityViewDisplay::build()
  3. 10 core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php \Drupal\Core\Entity\Entity\EntityViewDisplay::build()

Overrides EntityViewDisplayInterface::build

File

core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php, line 225

Class

EntityViewDisplay
Configuration entity.

Namespace

Drupal\Core\Entity\Entity

Code

public function build(FieldableEntityInterface $entity) {
    $build = $this->buildMultiple([
        $entity,
    ]);
    return $build[0];
}

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