EntityDisplayBase::setComponent

public EntityDisplayBase::setComponent($name, array $options = array()) Sets the display options for a component. Parameters string $name: The name of the component. array $options: The display options. Return value $this Overrides EntityDisplayInterface::setComponent File core/lib/Drupal/Core/Entity/EntityDisplayBase.php, line 322 Class EntityDisplayBase Provides a common base class for entity view and form displays. Namespace Drupal\Core\Entity Code public function setComponent($na

EntityDisplayBase::removeComponent

public EntityDisplayBase::removeComponent($name) Sets a component to be hidden. Parameters string $name: The name of the component. Return value $this Overrides EntityDisplayInterface::removeComponent File core/lib/Drupal/Core/Entity/EntityDisplayBase.php, line 347 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

EntityDisplayBase::preSave

public EntityDisplayBase::preSave(EntityStorageInterface $storage, $update = TRUE) Acts on an entity before the presave hook is invoked. Used before the entity is saved and before invoking the presave hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed. This is different from its counterpart in the Field API, FieldItemListInterface::preSave(), which is fired on all

EntityDisplayBase::onDependencyRemoval

public EntityDisplayBase::onDependencyRemoval(array $dependencies) Informs the entity that entities it depends on will be deleted. This method allows configuration entities to remove dependencies instead of being deleted themselves. Configuration entities can use this method to avoid being unnecessarily deleted during an extension uninstallation. For example, entity displays remove references to widgets and formatters if the plugin that supplies them depends on a module that is being uninstalle

EntityDisplayBase::init

protected EntityDisplayBase::init() Initializes the display. This fills in default options for components: that are not explicitly known as either "visible" or "hidden" in the display, or that are not supposed to be configurable. File core/lib/Drupal/Core/Entity/EntityDisplayBase.php, line 154 Class EntityDisplayBase Provides a common base class for entity view and form displays. Namespace Drupal\Core\Entity Code protected function init() { // Only populate defaults for "official"

EntityDisplayBase::id

public EntityDisplayBase::id() Gets the identifier. Return value string|int|null The entity identifier, or NULL if the object does not yet have an identifier. Overrides Entity::id File core/lib/Drupal/Core/Entity/EntityDisplayBase.php, line 234 Class EntityDisplayBase Provides a common base class for entity view and form displays. Namespace Drupal\Core\Entity Code public function id() { return $this->targetEntityType . '.' . $this->bundle . '.' . $this->mode; }

EntityDisplayBase::getTargetEntityTypeId

public EntityDisplayBase::getTargetEntityTypeId() Gets the entity type for which this display is used. Return value string The entity type id. Overrides EntityDisplayInterface::getTargetEntityTypeId File core/lib/Drupal/Core/Entity/EntityDisplayBase.php, line 198 Class EntityDisplayBase Provides a common base class for entity view and form displays. Namespace Drupal\Core\Entity Code public function getTargetEntityTypeId() { return $this->targetEntityType; }

EntityDisplayBase::getTargetBundle

public EntityDisplayBase::getTargetBundle() Gets the bundle to be displayed. Return value string The bundle to be displayed. Overrides EntityDisplayInterface::getTargetBundle File core/lib/Drupal/Core/Entity/EntityDisplayBase.php, line 219 Class EntityDisplayBase Provides a common base class for entity view and form displays. Namespace Drupal\Core\Entity Code public function getTargetBundle() { return $this->bundle; }

EntityDisplayBase::getOriginalMode

public EntityDisplayBase::getOriginalMode() Gets the original view or form mode that was requested. Return value string The original mode that was requested. Overrides EntityDisplayInterface::getOriginalMode File core/lib/Drupal/Core/Entity/EntityDisplayBase.php, line 212 Class EntityDisplayBase Provides a common base class for entity view and form displays. Namespace Drupal\Core\Entity Code public function getOriginalMode() { return $this->get('originalMode'); }

EntityDisplayBase::getMode

public EntityDisplayBase::getMode() Gets the view or form mode to be displayed. Return value string The mode to be displayed. Overrides EntityDisplayInterface::getMode File core/lib/Drupal/Core/Entity/EntityDisplayBase.php, line 205 Class EntityDisplayBase Provides a common base class for entity view and form displays. Namespace Drupal\Core\Entity Code public function getMode() { return $this->get('mode'); }