function ExtraFieldBlock::getEntity
Same name in other branches
- 9 core/modules/layout_builder/src/Plugin/Block/ExtraFieldBlock.php \Drupal\layout_builder\Plugin\Block\ExtraFieldBlock::getEntity()
- 10 core/modules/layout_builder/src/Plugin/Block/ExtraFieldBlock.php \Drupal\layout_builder\Plugin\Block\ExtraFieldBlock::getEntity()
- 11.x core/modules/layout_builder/src/Plugin/Block/ExtraFieldBlock.php \Drupal\layout_builder\Plugin\Block\ExtraFieldBlock::getEntity()
Gets the entity that has the field.
Return value
\Drupal\Core\Entity\FieldableEntityInterface The entity.
2 calls to ExtraFieldBlock::getEntity()
- ExtraFieldBlock::build in core/
modules/ layout_builder/ src/ Plugin/ Block/ ExtraFieldBlock.php - ExtraFieldBlock::getPreviewFallbackString in core/
modules/ layout_builder/ src/ Plugin/ Block/ ExtraFieldBlock.php
File
-
core/
modules/ layout_builder/ src/ Plugin/ Block/ ExtraFieldBlock.php, line 110
Class
- ExtraFieldBlock
- Provides a block that renders an extra field from an entity.
Namespace
Drupal\layout_builder\Plugin\BlockCode
protected function getEntity() {
return $this->getContextValue('entity');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.