public function EntityWrapper::__construct

Overrides TypedData::__construct().

Overrides TypedData::__construct

File

drupal/core/lib/Drupal/Core/Entity/Field/Type/EntityWrapper.php, line 64
Contains \Drupal\Core\Entity\Field\Type\EntityWrapper.

Class

EntityWrapper
Defines an 'entity' data type, e.g. the computed 'entity' property of entity references.

Namespace

Drupal\Core\Entity\Field\Type

Code

public function __construct(array $definition, $name = NULL, TypedDataInterface $parent = NULL) {
  parent::__construct($definition, $name, $parent);
  $this->entityType = isset($this->definition['constraints']['EntityType']) ? $this->definition['constraints']['EntityType'] : NULL;
}