You are here

public function Team::__construct in Apigee Edge 8

Team 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 AttributesAwareFieldableEdgeEntityBase::__construct

File

modules/apigee_edge_teams/src/Entity/Team.php, line 95

Class

Team
Defines the Team entity class.

Namespace

Drupal\apigee_edge_teams\Entity

Code

public function __construct(array $values, ?string $entity_type, ?EntityInterface $decorated = NULL) {
  $entity_type = $entity_type ?? 'team';

  // Callers expect that the status is always either 'active' or 'inactive',
  // never null.
  if (!isset($values['status'])) {
    $values['status'] = static::STATUS_ACTIVE;
  }
  parent::__construct($values, $entity_type, $decorated);
}