PHP Class eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway

Mostra file Open project: ezsystems/ezpublish-kernel Class Usage Examples

Public Methods

Method Description
addPolicy ( mixed $roleId, eZ\Publish\SPI\Persistence\User\Policy $policy ) Adds a policy to a role.
addPolicyLimitations ( integer $policyId, array $limitations ) Adds limitations to an existing policy.
createRole ( eZ\Publish\SPI\Persistence\User\Role $role ) : eZ\Publish\SPI\Persistence\User\Role Create new role.
deleteRole ( mixed $roleId, integer $status = Role::STATUS_DEFINED ) Delete the specified role (draft).
loadPoliciesByUserId ( mixed $userId ) : UserPolicy[] Returns the user policies associated with the user.
loadRole ( mixed $roleId, integer $status = Role::STATUS_DEFINED ) : array Loads a specified role by $roleId.
loadRoleAssignment ( mixed $roleAssignmentId ) : array Loads role assignment for specified assignment ID.
loadRoleAssignmentsByGroupId ( mixed $groupId, boolean $inherited = false ) : array Loads role assignments for specified content ID.
loadRoleAssignmentsByRoleId ( mixed $roleId ) : array Loads role assignments for given role ID.
loadRoleByIdentifier ( string $identifier, integer $status = Role::STATUS_DEFINED ) : array Loads a specified role by $identifier.
loadRoleDraftByRoleId ( mixed $roleId ) : array Loads a role draft by the original role ID.
loadRoles ( integer $status = Role::STATUS_DEFINED ) : array Loads all roles.
loadRolesForContentObjects ( array $contentIds, integer $status = Role::STATUS_DEFINED ) : array Loads all roles associated with the given content objects.
publishRoleDraft ( mixed $roleDraftId, mixed | null $originalRoleId = null ) Publish the specified role draft.
removePolicy ( mixed $policyId ) Removes a policy from a role.
removePolicyLimitations ( mixed $policyId ) Removes a policy from a role.
updateRole ( eZ\Publish\SPI\Persistence\User\RoleUpdateStruct $role ) Update role (draft).

Method Details

addPolicy() abstract public method

Adds a policy to a role.
abstract public addPolicy ( mixed $roleId, eZ\Publish\SPI\Persistence\User\Policy $policy )
$roleId mixed
$policy eZ\Publish\SPI\Persistence\User\Policy

addPolicyLimitations() abstract public method

Adds limitations to an existing policy.
abstract public addPolicyLimitations ( integer $policyId, array $limitations )
$policyId integer
$limitations array

createRole() abstract public method

Create new role.
abstract public createRole ( eZ\Publish\SPI\Persistence\User\Role $role ) : eZ\Publish\SPI\Persistence\User\Role
$role eZ\Publish\SPI\Persistence\User\Role
return eZ\Publish\SPI\Persistence\User\Role

deleteRole() abstract public method

If it's not a draft, the role assignments will also be deleted.
abstract public deleteRole ( mixed $roleId, integer $status = Role::STATUS_DEFINED )
$roleId mixed
$status integer One of Role::STATUS_DEFINED|Role::STATUS_DRAFT

loadPoliciesByUserId() abstract public method

Returns the user policies associated with the user.
abstract public loadPoliciesByUserId ( mixed $userId ) : UserPolicy[]
$userId mixed
return UserPolicy[]

loadRole() abstract public method

Loads a specified role by $roleId.
abstract public loadRole ( mixed $roleId, integer $status = Role::STATUS_DEFINED ) : array
$roleId mixed
$status integer One of Role::STATUS_DEFINED|Role::STATUS_DRAFT
return array

loadRoleAssignment() abstract public method

Loads role assignment for specified assignment ID.
abstract public loadRoleAssignment ( mixed $roleAssignmentId ) : array
$roleAssignmentId mixed
return array

loadRoleAssignmentsByGroupId() abstract public method

Loads role assignments for specified content ID.
abstract public loadRoleAssignmentsByGroupId ( mixed $groupId, boolean $inherited = false ) : array
$groupId mixed
$inherited boolean
return array

loadRoleAssignmentsByRoleId() abstract public method

Loads role assignments for given role ID.
abstract public loadRoleAssignmentsByRoleId ( mixed $roleId ) : array
$roleId mixed
return array

loadRoleByIdentifier() abstract public method

Loads a specified role by $identifier.
abstract public loadRoleByIdentifier ( string $identifier, integer $status = Role::STATUS_DEFINED ) : array
$identifier string
$status integer One of Role::STATUS_DEFINED|Role::STATUS_DRAFT
return array

loadRoleDraftByRoleId() abstract public method

Loads a role draft by the original role ID.
abstract public loadRoleDraftByRoleId ( mixed $roleId ) : array
$roleId mixed ID of the role the draft was created from.
return array

loadRoles() abstract public method

Loads all roles.
abstract public loadRoles ( integer $status = Role::STATUS_DEFINED ) : array
$status integer One of Role::STATUS_DEFINED|Role::STATUS_DRAFT
return array

loadRolesForContentObjects() abstract public method

Loads all roles associated with the given content objects.
abstract public loadRolesForContentObjects ( array $contentIds, integer $status = Role::STATUS_DEFINED ) : array
$contentIds array
$status integer One of Role::STATUS_DEFINED|Role::STATUS_DRAFT
return array

publishRoleDraft() abstract public method

If the draft was created from an existing role, published version will take the original role ID.
abstract public publishRoleDraft ( mixed $roleDraftId, mixed | null $originalRoleId = null )
$roleDraftId mixed
$originalRoleId mixed | null ID of role the draft was created from. Will be null if the role draft was completely new.

removePolicy() abstract public method

Removes a policy from a role.
abstract public removePolicy ( mixed $policyId )
$policyId mixed

removePolicyLimitations() abstract public method

Removes a policy from a role.
abstract public removePolicyLimitations ( mixed $policyId )
$policyId mixed

updateRole() abstract public method

Will not throw anything if location id is invalid.
abstract public updateRole ( eZ\Publish\SPI\Persistence\User\RoleUpdateStruct $role )
$role eZ\Publish\SPI\Persistence\User\RoleUpdateStruct