ExplicitReadWriteModelPermissions Class Reference

Public Member Functions

 addReadOnlyPermitable (Permitable $permitable)
 addReadWritePermitable (Permitable $permitable)
 addReadOnlyPermitableToRemove (Permitable $permitable)
 addReadWritePermitableToRemove (Permitable $permitable)
 removeAllReadWritePermitables ()
 getReadOnlyPermitablesCount ()
 getReadWritePermitablesCount ()
 getReadOnlyPermitablesToRemoveCount ()
 getReadWritePermitablesToRemoveCount ()
 getReadOnlyPermitables ()
 getReadWritePermitables ()
 getReadOnlyPermitablesToRemove ()
 getReadWritePermitablesToRemove ()
 isReadOrReadWritePermitable (Permitable $permitable)
 resolvePermitableKey (Permitable $permitable)

Protected Attributes

 $readOnlyPermitables = array()
 $readWritePermitables = array()
 $readOnlyPermitablesToRemove = array()
 $readWritePermitablesToRemove = array()

Detailed Description

Class helps interaction between the user interface, forms, and controllers that are involved in setting the explicit permissions on a model. This class merges permission concepts together to form easier to understand structures for the user interface. Currently this only supports either readOnly or readWrite permission combinations against a model for a user or group.

See also:
ExplicitReadWriteModelPermissionsElement
ExplicitReadWriteModelPermissionsUtil

Definition at line 45 of file ExplicitReadWriteModelPermissions.php.


Member Function Documentation

addReadOnlyPermitable ( Permitable permitable  ) 

Add a permitable object to the read only array.

Parameters:
object $permitable
Exceptions:
NotSupportedException 

Definition at line 78 of file ExplicitReadWriteModelPermissions.php.

addReadWritePermitable ( Permitable permitable  ) 

Add a permitable object to the read write array.

Parameters:
object $permitable
Exceptions:
NotSupportedException 

Definition at line 97 of file ExplicitReadWriteModelPermissions.php.

addReadOnlyPermitableToRemove ( Permitable permitable  ) 

Add a permitable object that needs to be removed from the securable item.

Parameters:
object $permitable
Exceptions:
NotSupportedException 

Definition at line 116 of file ExplicitReadWriteModelPermissions.php.

addReadWritePermitableToRemove ( Permitable permitable  ) 

Add a permitable object that needs to be removed from the securable item.

Parameters:
object $permitable
Exceptions:
NotSupportedException 

Definition at line 135 of file ExplicitReadWriteModelPermissions.php.

getReadOnlyPermitablesCount (  ) 
Returns:
integer count of read only permitables

Definition at line 164 of file ExplicitReadWriteModelPermissions.php.

getReadWritePermitablesCount (  ) 
Returns:
integer count of read/write permitables

Definition at line 172 of file ExplicitReadWriteModelPermissions.php.

getReadOnlyPermitablesToRemoveCount (  ) 
Returns:
integer count of read only permitables to remove from a securable item.

Definition at line 180 of file ExplicitReadWriteModelPermissions.php.

getReadWritePermitablesToRemoveCount (  ) 
Returns:
integer count of read/write permitables to remove from a securable item.

Definition at line 188 of file ExplicitReadWriteModelPermissions.php.

getReadOnlyPermitables (  ) 
Returns:
array of read only permitables

Definition at line 196 of file ExplicitReadWriteModelPermissions.php.

getReadWritePermitables (  ) 
Returns:
array of read/write permitables

Definition at line 204 of file ExplicitReadWriteModelPermissions.php.

getReadOnlyPermitablesToRemove (  ) 
Returns:
array of read only permitables to remove from a securable item.

Definition at line 212 of file ExplicitReadWriteModelPermissions.php.

getReadWritePermitablesToRemove (  ) 
Returns:
array of read/write permitables to remove to remove from a securable item.

Definition at line 220 of file ExplicitReadWriteModelPermissions.php.

isReadOrReadWritePermitable ( Permitable permitable  ) 

Given a permitable, is that permitable in the read only data or the read write data?

Parameters:
Permitable $permitable
Returns:
boolean true if it is in one of the data arrays.

Definition at line 230 of file ExplicitReadWriteModelPermissions.php.

resolvePermitableKey ( Permitable permitable  ) 

Returns the related id from permitable models. This is unique for every Permitable child. Public for tests

Parameters:
Permitable $permitable
Returns:
int

Definition at line 248 of file ExplicitReadWriteModelPermissions.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Fri Nov 24 07:10:24 2017