You are here

public function DsFieldTemplateBase::setEntity in Display Suite 8.4

Same name and namespace in other branches
  1. 8.2 src/Plugin/DsFieldTemplate/DsFieldTemplateBase.php \Drupal\ds\Plugin\DsFieldTemplate\DsFieldTemplateBase::setEntity()
  2. 8.3 src/Plugin/DsFieldTemplate/DsFieldTemplateBase.php \Drupal\ds\Plugin\DsFieldTemplate\DsFieldTemplateBase::setEntity()

Sets the entity this layout belong too.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity.

Overrides DsFieldTemplateInterface::setEntity

File

src/Plugin/DsFieldTemplate/DsFieldTemplateBase.php, line 39

Class

DsFieldTemplateBase
Base class for all the ds plugins.

Namespace

Drupal\ds\Plugin\DsFieldTemplate

Code

public function setEntity(EntityInterface $entity) {
  $this->entity = $entity;
}