public function getRole($identifier)
    {
        $role = null;
        try {
            $role = $this->roleService->loadRoleByIdentifier($identifier);
        } catch (ApiExceptions\NotFoundException $e) {
            // Role not found, do nothing, returns null
        }

        return $role;
    }
public function getRole($identifier)
    {
        $role = null;
        try {
            $role = $this->roleService->loadRoleByIdentifier($identifier);
        } catch (ApiExceptions\NotFoundException $e) {
            // Role not found, do nothing, returns null
        }

        return $role;
    }
public function getRole ( $ identifier ) { $ role = null ; try { $ role = $ this -> roleService -> loadRoleByIdentifier ( $ identifier ) ; } catch ( ApiExceptions \ NotFoundException $ e ) { // Role not found, do nothing, returns null } return $ role ; }
Fetches the role with identifier.

@param string $identifier Role identifier

@return \eZ\Publish\API\Repository\Values\User\Role
Fetches the role with identifier .