public function ExtraFieldDisplayBase::setEntity in Extra Field 8
Same name and namespace in other branches
- 8.2 src/Plugin/ExtraFieldDisplayBase.php \Drupal\extra_field\Plugin\ExtraFieldDisplayBase::setEntity()
Stores the field's parent entity.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: The entity that hosts the field.
Overrides ExtraFieldDisplayInterface::setEntity
File
- src/
Plugin/ ExtraFieldDisplayBase.php, line 40
Class
- ExtraFieldDisplayBase
- Base class for Extra field Display plugins.
Namespace
Drupal\extra_field\PluginCode
public function setEntity(ContentEntityInterface $entity) {
$this->entity = $entity;
}