public function FieldItemInterface::getEntity in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Field/FieldItemInterface.php \Drupal\Core\Field\FieldItemInterface::getEntity()
- 9 core/lib/Drupal/Core/Field/FieldItemInterface.php \Drupal\Core\Field\FieldItemInterface::getEntity()
Gets the entity that field belongs to.
Return value
\Drupal\Core\Entity\FieldableEntityInterface The entity object.
1 method overrides FieldItemInterface::getEntity()
- FieldItemBase::getEntity in core/
lib/ Drupal/ Core/ Field/ FieldItemBase.php - Gets the entity that field belongs to.
File
- core/
lib/ Drupal/ Core/ Field/ FieldItemInterface.php, line 96
Class
- FieldItemInterface
- Interface for entity field items.
Namespace
Drupal\Core\FieldCode
public function getEntity();