You are here

public function Client::__construct in OAuth2 Server 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/Client.php \Drupal\oauth2_server\Entity\Client::__construct()

Constructs an Entity object.

Parameters

array $values: An array of values to set, keyed by property name. If the entity type has bundles, the bundle key has to be specified.

string $entity_type: The type of the entity to create.

Overrides ConfigEntityBase::__construct

File

src/Entity/Client.php, line 156

Class

Client
Defines the OAuth2 client entity.

Namespace

Drupal\oauth2_server\Entity

Code

public function __construct(array $values, $entity_type) {
  if (isset($values['unhashed_client_secret'])) {
    $values['client_secret'] = $this
      ->hashClientSecret($values['unhashed_client_secret']);
  }
  parent::__construct($values, $entity_type);
}