function EntityDisplayBase::getFieldDefinition

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/EntityDisplayBase.php \Drupal\Core\Entity\EntityDisplayBase::getFieldDefinition()
  2. 10 core/lib/Drupal/Core/Entity/EntityDisplayBase.php \Drupal\Core\Entity\EntityDisplayBase::getFieldDefinition()
  3. 8.9.x core/lib/Drupal/Core/Entity/EntityDisplayBase.php \Drupal\Core\Entity\EntityDisplayBase::getFieldDefinition()

Gets the field definition of a field.

4 calls to EntityDisplayBase::getFieldDefinition()
LayoutBuilderEntityViewDisplay::buildMultiple in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Builds a renderable array for the components of a set of entities.
LayoutBuilderEntityViewDisplay::buildMultiple in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Builds a renderable array for the components of a set of entities.
LayoutBuilderEntityViewDisplay::setComponent in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Sets the display options for a component.
LayoutBuilderEntityViewDisplay::setComponent in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Sets the display options for a component.

File

core/lib/Drupal/Core/Entity/EntityDisplayBase.php, line 395

Class

EntityDisplayBase
Provides a common base class for entity view and form displays.

Namespace

Drupal\Core\Entity

Code

protected function getFieldDefinition($field_name) {
  $definitions = $this->getFieldDefinitions();
  return $definitions[$field_name] ?? NULL;
}

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