public function FieldItemBase::getEntity in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Field/FieldItemBase.php \Drupal\Core\Field\FieldItemBase::getEntity()
Gets the entity that field belongs to.
Return value
\Drupal\Core\Entity\FieldableEntityInterface The entity object.
Overrides FieldItemInterface::getEntity
8 calls to FieldItemBase::getEntity()
- ChangedItem::preSave in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ ChangedItem.php - Defines custom presave behavior for field values.
- DefaultLanguageItem::applyDefaultValue in core/
modules/ language/ src/ DefaultLanguageItem.php - Applies the default value.
- FieldTestItem::postSave in core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Field/ FieldType/ FieldTestItem.php - Defines custom post-save behavior for field values.
- ListItemBase::getSettableOptions in core/
modules/ options/ src/ Plugin/ Field/ FieldType/ ListItemBase.php - Returns an array of settable values with labels for display.
- PasswordItem::preSave in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ PasswordItem.php - Defines custom presave behavior for field values.
File
- core/
lib/ Drupal/ Core/ Field/ FieldItemBase.php, line 65 - Contains \Drupal\Core\Field\FieldItemBase.
Class
- FieldItemBase
- An entity field item.
Namespace
Drupal\Core\FieldCode
public function getEntity() {
return $this
->getParent()
->getEntity();
}