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