public FieldItemBase::getEntity()
Gets the entity that field belongs to.
Return value
\Drupal\Core\Entity\FieldableEntityInterface The entity object.
Overrides FieldItemInterface::getEntity
File
- core/lib/Drupal/Core/Field/FieldItemBase.php, line 60
Class
- FieldItemBase
- An entity field item.
Namespace
Drupal\Core\Field
Code
1 2 3 | public function getEntity() { return $this ->getParent()->getEntity(); } |
Please login to continue.