You are here

public function EntityDisplayBase::removeComponent in Zircon Profile 8.0

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

Sets a component to be hidden.

Parameters

string $name: The name of the component.

Return value

$this

Overrides EntityDisplayInterface::removeComponent

1 call to EntityDisplayBase::removeComponent()
EntityDisplayBase::onDependencyRemoval in core/lib/Drupal/Core/Entity/EntityDisplayBase.php
Informs the entity that entities it depends on will be deleted.

File

core/lib/Drupal/Core/Entity/EntityDisplayBase.php, line 352
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 removeComponent($name) {
  $this->hidden[$name] = TRUE;
  unset($this->content[$name]);
  unset($this->plugins[$name]);
  return $this;
}