public function ScopeEntity::__construct in Simple OAuth (OAuth2) & OpenID Connect 8.4
Same name and namespace in other branches
- 8.2 src/Entities/ScopeEntity.php \Drupal\simple_oauth\Entities\ScopeEntity::__construct()
- 8.3 src/Entities/ScopeEntity.php \Drupal\simple_oauth\Entities\ScopeEntity::__construct()
- 5.x src/Entities/ScopeEntity.php \Drupal\simple_oauth\Entities\ScopeEntity::__construct()
Construct a ScopeEntity instance.
Parameters
\Drupal\User\RoleInterface $role: The role associated to the scope.
File
- src/
Entities/ ScopeEntity.php, line 26
Class
Namespace
Drupal\simple_oauth\EntitiesCode
public function __construct(RoleInterface $role) {
$this->role = $role;
$this
->setIdentifier($role
->id());
$this->name = $role
->label();
$this
->addCacheableDependency($role);
}