You are here

public function DeveloperApp::__construct in Apigee Edge 8

DeveloperApp 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 App::__construct

File

src/Entity/DeveloperApp.php, line 123

Class

DeveloperApp
Defines the Developer app entity class.

Namespace

Drupal\apigee_edge\Entity

Code

public function __construct(array $values, ?string $entity_type = NULL, ?EdgeEntityInterface $decorated = NULL) {

  // Little help to make it easier to initialize a new developer app object
  // with a property configured developerId which is required in app
  // creation.
  // @see DeveloperAppEntityControllerProxy::create()
  if (isset($values['drupalUserId'])) {
    $this
      ->setOwnerId($values['drupalUserId']);
  }

  /** @var \Apigee\Edge\Api\Management\Entity\DeveloperAppInterface $decorated */
  $entity_type = $entity_type ?? 'developer_app';
  parent::__construct($values, $entity_type, $decorated);
}