protected function ScopeRepository::scopeFactory in Simple OAuth (OAuth2) & OpenID Connect 8.3
Same name and namespace in other branches
- 8.4 src/Repositories/ScopeRepository.php \Drupal\simple_oauth\Repositories\ScopeRepository::scopeFactory()
- 8.2 src/Repositories/ScopeRepository.php \Drupal\simple_oauth\Repositories\ScopeRepository::scopeFactory()
- 5.x src/Repositories/ScopeRepository.php \Drupal\simple_oauth\Repositories\ScopeRepository::scopeFactory()
Build a scope entity.
Parameters
\Drupal\user\RoleInterface $role: The associated role.
Return value
\League\OAuth2\Server\Entities\ScopeEntityInterface The initialized scope entity.
2 calls to ScopeRepository::scopeFactory()
- ScopeRepository::addRoleToScopes in src/
Repositories/ ScopeRepository.php - Add an additional scope if it's not present.
- ScopeRepository::getScopeEntityByIdentifier in src/
Repositories/ ScopeRepository.php
File
- src/
Repositories/ ScopeRepository.php, line 93
Class
Namespace
Drupal\simple_oauth\RepositoriesCode
protected function scopeFactory(RoleInterface $role) {
return new ScopeEntity($role);
}