function EntityDisplayBase::getComponent

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

Overrides EntityDisplayInterface::getComponent

4 calls to EntityDisplayBase::getComponent()
EntityFormDisplay::getRenderer in core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php
Gets the renderer plugin for a field (e.g. widget, formatter).
EntityFormDisplay::processForm in core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php
Process callback: assigns weights and hides extra fields.
EntityViewDisplay::getRenderer in core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php
Gets the renderer plugin for a field (e.g. widget, formatter).
LayoutBuilderEntityViewDisplay::getComponent in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Gets the display options set for a component.
1 method overrides EntityDisplayBase::getComponent()
LayoutBuilderEntityViewDisplay::getComponent in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Gets the display options set for a component.

File

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

Class

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

Namespace

Drupal\Core\Entity

Code

public function getComponent($name) {
    return $this->content[$name] ?? NULL;
}

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