public function ScopeRepository::getScopeEntityByIdentifier in Simple OAuth (OAuth2) & OpenID Connect 8.4
Same name and namespace in other branches
- 8.2 src/Repositories/ScopeRepository.php \Drupal\simple_oauth\Repositories\ScopeRepository::getScopeEntityByIdentifier()
- 8.3 src/Repositories/ScopeRepository.php \Drupal\simple_oauth\Repositories\ScopeRepository::getScopeEntityByIdentifier()
- 5.x src/Repositories/ScopeRepository.php \Drupal\simple_oauth\Repositories\ScopeRepository::getScopeEntityByIdentifier()
File
- src/
Repositories/ ScopeRepository.php, line 37
Class
- ScopeRepository
- The repository for scopes.
Namespace
Drupal\simple_oauth\RepositoriesCode
public function getScopeEntityByIdentifier($scope_identifier) {
$role = $this->entityTypeManager
->getStorage('user_role')
->load($scope_identifier);
if (!$role) {
return NULL;
}
return $this
->scopeFactory($role);
}