You are here

public function EntityDisplayBase::getComponent in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/EntityDisplayBase.php \Drupal\Core\Entity\EntityDisplayBase::getComponent()

Gets the display options set for a component.

Parameters

string $name: The name of the component.

Return value

array|null The display options for the component, or NULL if the component is not displayed.

Overrides EntityDisplayInterface::getComponent

3 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).

File

core/lib/Drupal/Core/Entity/EntityDisplayBase.php, line 320
Contains \Drupal\Core\Entity\EntityDisplayBase.

Class

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

Namespace

Drupal\Core\Entity

Code

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