public function ClientEntity::__construct in Simple OAuth (OAuth2) & OpenID Connect 8.4
Same name and namespace in other branches
- 8.2 src/Entities/ClientEntity.php \Drupal\simple_oauth\Entities\ClientEntity::__construct()
- 8.3 src/Entities/ClientEntity.php \Drupal\simple_oauth\Entities\ClientEntity::__construct()
- 5.x src/Entities/ClientEntity.php \Drupal\simple_oauth\Entities\ClientEntity::__construct()
ClientEntity constructor.
Parameters
\Drupal\consumers\Entity\Consumer $entity: The Drupal entity.
File
- src/
Entities/ ClientEntity.php, line 24
Class
Namespace
Drupal\simple_oauth\EntitiesCode
public function __construct(Consumer $entity) {
$this->entity = $entity;
$this
->setIdentifier($entity
->uuid());
$this
->setName($entity
->label());
if ($entity
->hasField('redirect')) {
$this->redirectUri = $entity
->get('redirect')->value;
}
}