Overrides \Drupal\Core\TypedData\TypedData::getValue().
Overrides TypedData::getValue
public function getValue() {
if (isset($this->newEntity)) {
return $this->newEntity;
}
if (!empty($this->definition['settings']['id source'])) {
$this->id = $this->parent
->__get($this->definition['settings']['id source']);
}
return $this->id ? entity_load($this->entityType, $this->id) : NULL;
}