You are here

protected function EntityDisplayBase::getFieldDefinition in Drupal 8

Same name and namespace in other branches
  1. 9 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()

Gets the field definition of a field.

8 calls to EntityDisplayBase::getFieldDefinition()
EntityDisplayBase::setComponent in core/lib/Drupal/Core/Entity/EntityDisplayBase.php
Sets the display options for a component.
EntityFormDisplay::buildForm in core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php
Adds field widgets to an entity form.
EntityFormDisplay::getPluginCollections in core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php
Gets the plugin collections used by this object.
EntityFormDisplay::getRenderer in core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php
Gets the renderer plugin for a field (e.g. widget, formatter).
EntityViewDisplay::getPluginCollections in core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php
Gets the plugin collections used by this object.

... See full list

File

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

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 isset($definitions[$field_name]) ? $definitions[$field_name] : NULL;
}