class ScopeEntity in Simple OAuth (OAuth2) & OpenID Connect 8.2
Same name and namespace in other branches
- 8.4 src/Entities/ScopeEntity.php \Drupal\simple_oauth\Entities\ScopeEntity
- 8.3 src/Entities/ScopeEntity.php \Drupal\simple_oauth\Entities\ScopeEntity
- 5.x src/Entities/ScopeEntity.php \Drupal\simple_oauth\Entities\ScopeEntity
Hierarchy
- class \Drupal\simple_oauth\Entities\ScopeEntity implements \League\OAuth2\Server\Entities\ScopeEntityInterface uses \League\OAuth2\Server\Entities\Traits\EntityTrait
Expanded class hierarchy of ScopeEntity
1 file declares its use of ScopeEntity
- ScopeRepository.php in src/
Repositories/ ScopeRepository.php
File
- src/
Entities/ ScopeEntity.php, line 9
Namespace
Drupal\simple_oauth\EntitiesView source
class ScopeEntity implements ScopeEntityInterface {
use EntityTrait;
/**
* Construct a ScopeEntity instance.
*
* @param \Drupal\User\RoleInterface $role
* The role associated to the scope.
*/
public function __construct(RoleInterface $role) {
$this->role = $role;
$this
->setIdentifier($role
->id());
}
public function jsonSerialize() {
return $this
->getIdentifier();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ScopeEntity:: |
public | function | ||
ScopeEntity:: |
public | function | Construct a ScopeEntity instance. |