eZ\Publish\Core\Repository\RoleService::loadRoleByIdentifier PHP Метод

loadRoleByIdentifier() публичный Метод

Loads a role for the given identifier.
public loadRoleByIdentifier ( string $identifier ) : eZ\Publish\API\Repository\Values\User\Role
$identifier string
Результат eZ\Publish\API\Repository\Values\User\Role
    public function loadRoleByIdentifier($identifier)
    {
        if (!is_string($identifier)) {
            throw new InvalidArgumentValue('identifier', $identifier);
        }
        if ($this->repository->hasAccess('role', 'read') !== true) {
            throw new UnauthorizedException('role', 'read');
        }
        $spiRole = $this->userHandler->loadRoleByIdentifier($identifier);
        return $this->roleDomainMapper->buildDomainRoleObject($spiRole);
    }