public function Entity::getTypedData in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Entity/Entity.php \Drupal\Core\Entity\Entity::getTypedData()
Gets a typed data object for this entity object.
The returned typed data object wraps this entity and allows dealing with entities based on the generic typed data API.
Return value
\Drupal\Core\TypedData\ComplexDataInterface The typed data object for this entity.
Overrides EntityInterface::getTypedData
See also
\Drupal\Core\TypedData\TypedDataInterface
File
- core/
lib/ Drupal/ Core/ Entity/ Entity.php, line 608 - Contains \Drupal\Core\Entity\Entity.
Class
- Entity
- Defines a base entity class.
Namespace
Drupal\Core\EntityCode
public function getTypedData() {
if (!isset($this->typedData)) {
$class = \Drupal::typedDataManager()
->getDefinition('entity')['class'];
$this->typedData = $class::createFromEntity($this);
}
return $this->typedData;
}