function FieldItemListInterface::getEntity
Same name in other branches
- 9 core/lib/Drupal/Core/Field/FieldItemListInterface.php \Drupal\Core\Field\FieldItemListInterface::getEntity()
- 10 core/lib/Drupal/Core/Field/FieldItemListInterface.php \Drupal\Core\Field\FieldItemListInterface::getEntity()
- 11.x core/lib/Drupal/Core/Field/FieldItemListInterface.php \Drupal\Core\Field\FieldItemListInterface::getEntity()
Gets the entity that field belongs to.
Return value
\Drupal\Core\Entity\FieldableEntityInterface The entity object. If the entity is translatable and a specific translation is required, always request it by calling ::getTranslation() or ::getUntranslated() as the language of the returned object is not defined.
1 method overrides FieldItemListInterface::getEntity()
- FieldItemList::getEntity in core/
lib/ Drupal/ Core/ Field/ FieldItemList.php - Gets the entity that field belongs to.
File
-
core/
lib/ Drupal/ Core/ Field/ FieldItemListInterface.php, line 39
Class
- FieldItemListInterface
- Interface for fields, being lists of field items.
Namespace
Drupal\Core\FieldCode
public function getEntity();
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.