You are here

public function AttributesAwareFieldableEdgeEntityBase::__construct in Apigee Edge 8

AttributesAwareFieldableEntityBase constructor.

Parameters

array $values: An array of values to set, keyed by property name.

null|string $entity_type: Type of the entity. It is optional because constructor sets its default value.

\Apigee\Edge\Entity\EntityInterface|null $decorated: The SDK entity that this Drupal entity decorates.

Overrides EdgeEntityBase::__construct

2 calls to AttributesAwareFieldableEdgeEntityBase::__construct()
App::__construct in src/Entity/App.php
App constructor.
Team::__construct in modules/apigee_edge_teams/src/Entity/Team.php
Team constructor.
2 methods override AttributesAwareFieldableEdgeEntityBase::__construct()
App::__construct in src/Entity/App.php
App constructor.
Team::__construct in modules/apigee_edge_teams/src/Entity/Team.php
Team constructor.

File

src/Entity/AttributesAwareFieldableEdgeEntityBase.php, line 52

Class

AttributesAwareFieldableEdgeEntityBase
For fieldable Edge entities that can use attributes as field storage.

Namespace

Drupal\apigee_edge\Entity

Code

public function __construct(array $values, string $entity_type, ?EntityInterface $decorated = NULL) {
  parent::__construct($values, $entity_type, $decorated);
  if (!$this->decorated instanceof AttributesPropertyInterface) {
    throw new InvalidArgumentException(sprintf('Decorated SDK entity must be instance of %s interface, got %s.', AttributesPropertyInterface::class, get_class($decorated)));
  }
}