class ClientEntity 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
- 8.3 src/Entities/ClientEntity.php \Drupal\simple_oauth\Entities\ClientEntity
- 5.x src/Entities/ClientEntity.php \Drupal\simple_oauth\Entities\ClientEntity
Hierarchy
- class \Drupal\simple_oauth\Entities\ClientEntity implements ClientEntityInterface uses \League\OAuth2\Server\Entities\Traits\EntityTrait
Expanded class hierarchy of ClientEntity
1 file declares its use of ClientEntity
- ClientRepository.php in src/
Repositories/ ClientRepository.php
File
- src/
Entities/ ClientEntity.php, line 9
Namespace
Drupal\simple_oauth\EntitiesView source
class ClientEntity implements ClientEntityInterface {
use EntityTrait, ClientTrait;
/**
* @var \Drupal\consumers\Entity\Consumer
*/
protected $entity;
/**
* ClientEntity constructor.
*
* @param \Drupal\consumers\Entity\Consumer $entity
* The Drupal entity.
*/
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;
}
}
/**
* {@inheritdoc}
*/
public function setName($name) {
$this->name = $name;
}
/**
* {@inheritdoc}
*/
public function getDrupalEntity() {
return $this->entity;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ClientEntity:: |
protected | property | ||
ClientEntity:: |
public | function |
Returns the associated Drupal entity. Overrides ClientEntityInterface:: |
|
ClientEntity:: |
public | function |
Set the name of the client. Overrides ClientEntityInterface:: |
|
ClientEntity:: |
public | function | ClientEntity constructor. |