eZPublishCommunityProject  2013.4
eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase Class Reference

Base class for content type gateways. More...

+ Inheritance diagram for eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase:
+ Collaboration diagram for eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase:

Public Member Functions

 __construct (EzcDbHandler $handler)
 Construct from database handler. More...
 
 addPolicy ($roleId, Policy $policy)
 Adds a policy to a role. More...
 
 addPolicyLimitations ($policyId, array $limitations)
 Adds limitations to an existing policy. More...
 
 createRole (Role $role)
 Create new role. More...
 
 deleteRole ($roleId)
 Delete the specified role. More...
 
 loadPoliciesByUserId ($userId)
 Returns the user policies associated with the user. More...
 
 loadRole ($roleId)
 Loads a specified role by id. More...
 
 loadRoleAssignmentsByGroupId ($groupId, $inherited=false)
 Loads role assignments for specified content ID. More...
 
 loadRoleByIdentifier ($identifier)
 Loads a specified role by $identifier. More...
 
 loadRoles ()
 Loads all roles. More...
 
 loadRolesForContentObjects ($contentIds)
 Loads all roles associated with the given content objects. More...
 
 removePolicy ($policyId)
 Removes a policy from a role. More...
 
 removePolicyLimitations ($policyId)
 Remove all limitations for a policy. More...
 
 updateRole (RoleUpdateStruct $role)
 Update role. More...
 
- Public Member Functions inherited from eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway
 addPolicy ($roleId, Policy $policy)
 Adds a policy to a role. More...
 
 addPolicyLimitations ($policyId, array $limitations)
 Adds limitations to an existing policy. More...
 
 createRole (Role $role)
 Create new role. More...
 
 deleteRole ($roleId)
 Delete the specified role. More...
 
 loadPoliciesByUserId ($userId)
 Returns the user policies associated with the user. More...
 
 loadRole ($roleId)
 Loads a specified role by $roleId. More...
 
 loadRoleAssignmentsByGroupId ($groupId, $inherited=false)
 Loads role assignments for specified content ID. More...
 
 loadRoleByIdentifier ($identifier)
 Loads a specified role by $identifier. More...
 
 loadRoles ()
 Loads all roles. More...
 
 loadRolesForContentObjects ($contentIds)
 Loads all roles associated with the given content objects. More...
 
 removePolicy ($policyId)
 Removes a policy from a role. More...
 
 removePolicyLimitations ($policyId)
 Removes a policy from a role. More...
 
 updateRole (RoleUpdateStruct $role)
 Update role. More...
 

Public Attributes

const GROUP_TYPE_ID = 3
 Internal type ID for user groups. More...
 

Protected Member Functions

 fetchUserGroups ($userId)
 Fetch all group IDs the user belongs to. More...
 

Protected Attributes

 $handler
 

Detailed Description

Base class for content type gateways.

Constructor & Destructor Documentation

eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::__construct ( EzcDbHandler  $handler)

Construct from database handler.

Parameters
\eZ\Publish\Core\Persistence\Legacy\EzcDbHandler$handler
Returns
void

Member Function Documentation

eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::addPolicy (   $roleId,
Policy  $policy 
)

Adds a policy to a role.

Parameters
mixed$roleId
\eZ\Publish\SPI\Persistence\User\Policy$policy
Returns
void
eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::addPolicyLimitations (   $policyId,
array  $limitations 
)

Adds limitations to an existing policy.

Parameters
int$policyId
array$limitations
Returns
void

Referenced by eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase\addPolicy().

eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::createRole ( Role  $role)

Create new role.

Parameters
\eZ\Publish\SPI\Persistence\User\Role$role
Returns
Role
eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::deleteRole (   $roleId)

Delete the specified role.

Parameters
mixed$roleId
eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::fetchUserGroups (   $userId)
protected
eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::loadPoliciesByUserId (   $userId)

Returns the user policies associated with the user.

Parameters
mixed$userId
Returns
UserPolicy[]
eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::loadRole (   $roleId)

Loads a specified role by id.

Parameters
mixed$roleId
Returns
array
eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::loadRoleAssignmentsByGroupId (   $groupId,
  $inherited = false 
)

Loads role assignments for specified content ID.

Parameters
mixed$groupId
boolean$inherited
Returns
array
eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::loadRoleByIdentifier (   $identifier)

Loads a specified role by $identifier.

Parameters
string$identifier
Returns
array
eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::loadRoles ( )

Loads all roles.

Returns
array
eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::loadRolesForContentObjects (   $contentIds)

Loads all roles associated with the given content objects.

Parameters
array$contentIds
Returns
array

Referenced by eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase\loadPoliciesByUserId().

eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::removePolicy (   $policyId)

Removes a policy from a role.

Parameters
mixed$policyId
Returns
void
eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::removePolicyLimitations (   $policyId)

Remove all limitations for a policy.

Parameters
mixed$policyId
Returns
void

Referenced by eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase\removePolicy().

eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::updateRole ( RoleUpdateStruct  $role)

Update role.

Parameters
\eZ\Publish\SPI\Persistence\User\RoleUpdateStruct$role

Member Data Documentation

eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::$handler
protected
const eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\EzcDatabase::GROUP_TYPE_ID = 3

Internal type ID for user groups.


The documentation for this class was generated from the following file: