diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php index 1e5b798..14b9a3b 100644 --- a/core/lib/Drupal/Core/Entity/Entity.php +++ b/core/lib/Drupal/Core/Entity/Entity.php @@ -575,12 +575,10 @@ public function toArray() { */ public function getTypedDataAdapter() { if (!isset($this->typedDataAdapter)) { - $class = \Drupal::typedDataManager()->getDefinition('entity')['class']; $definition = EntityDataDefinition::create() ->setEntityTypeId($this->getEntityTypeId()) ->setBundles([ $this->bundle() ]); - $this->typedDataAdapter = $class::createInstance($definition); - $this->typedDataAdapter->setValue($this); + $this->typedDataAdapter = \Drupal::typedDataManager()->create($definition, $this); } return $this->typedDataAdapter; }