public loadRoleByIdentifier ( string $identifier, integer $status = Role::STATUS_DEFINED ) : eZ\Publish\SPI\Persistence\User\Role | ||
$identifier | string | |
$status | integer | One of Role::STATUS_DEFINED|Role::STATUS_DRAFT |
return | eZ\Publish\SPI\Persistence\User\Role |
public function loadRoleByIdentifier($identifier, $status = Role::STATUS_DEFINED)
{
$data = $this->roleGateway->loadRoleByIdentifier($identifier, $status);
if (empty($data)) {
throw new RoleNotFound($identifier, $status);
}
$role = $this->mapper->mapRole($data);
foreach ($role->policies as $policy) {
$this->limitationConverter->toSPI($policy);
}
return $role;
}