public function loadRoleDraft($roleId)
    {
        try {
            // First try to load the draft for given role.
            return $this->roleService->loadRoleDraftByRoleId($roleId);
        } catch (NotFoundException $e) {
            // We might want a newly created role, so try to load it by its ID.
            // loadRoleDraft() might throw a NotFoundException (wrong $roleId). If so, let it bubble up.
            return $this->roleService->loadRoleDraft($roleId);
        }
    }
public function loadRoleDraft($roleId)
    {
        try {
            // First try to load the draft for given role.
            return $this->roleService->loadRoleDraftByRoleId($roleId);
        } catch (NotFoundException $e) {
            // We might want a newly created role, so try to load it by its ID.
            // loadRoleDraft() might throw a NotFoundException (wrong $roleId). If so, let it bubble up.
            return $this->roleService->loadRoleDraft($roleId);
        }
    }
public function loadRoleDraft ( $ roleId ) { try { // First try to load the draft for given role. return $ this -> roleService -> loadRoleDraftByRoleId ( $ roleId ) ; } catch ( NotFoundException $ e ) { // We might want a newly created role, so try to load it by its ID. // loadRoleDraft() might throw a NotFoundException (wrong $roleId). If so, let it bubble up. return $ this -> roleService -> loadRoleDraft ( $ roleId ) ; } }
Loads a role draft.

@param mixed $roleId Original role ID, or ID of the role draft itself

@return \eZ\Publish\API\Repository\Values\User\RoleDraft
Loads a role draft .