|
eZ Publish
[trunk]
|
Defines a policy in the permission system. More...
Inheritance diagram for eZPolicy:
Collaboration diagram for eZPolicy:Public Member Functions | |
| accessArray ($ignoreLimitIdentifier=false) | |
| appendLimitation ($identifier, $values) | |
| copy ($roleID) | |
| Copies the policy and its limitations to another role. | |
| createTemporaryCopy () | |
| Creates a temporary copy for this policy so that it can be edited. | |
| eZPolicy ($row) | |
| limitationList ($useCache=true, $ignoreLimitIdentifier=false) | |
| limitIdentifier () | |
| limitValue () | |
| removeThis ($id=false) | |
| role () | |
| saveTemporary () | |
| Saves a temporary limitation created with createTemporaryCopy(). | |
| setAttribute ($attr, $val) | |
| Sets the attribute $attr to the value $val. | |
| userRoleID () | |
Static Public Member Functions | |
| static | create ($roleID, $module, $function) |
| static | createNew ($roleID, $params=array()) |
| static | definition () |
| Returns the definition for the object, the default implementation is to return an empty array. | |
| static | fetch ($policyID) |
| Fetches a policy by ID. | |
| static | fetchTemporaryCopy ($policyID) |
| Fetches the temporary copy of a policy. | |
| static | removeByID ($id) |
Public Attributes | |
| $Disabled = false | |
| $LimitIdentifier | |
| $LimitValue | |
| $UserRoleID | |
Defines a policy in the permission system.
Definition at line 18 of file ezpolicy.php.
| eZPolicy::accessArray | ( | $ | ignoreLimitIdentifier = false | ) |
Generate access array from this policy.
return access array
Definition at line 253 of file ezpolicy.php.
| eZPolicy::appendLimitation | ( | $ | identifier, |
| $ | values | ||
| ) |
Appends a new policy limitation to the current policy and returns it.
| $identifier | The identifier for the limitation, e.g. 'Class' |
| $values | Array of values to store for limitation. |
Definition at line 167 of file ezpolicy.php.
| eZPolicy::copy | ( | $ | roleID | ) |
Copies the policy and its limitations to another role.
| int | $roleID | the ID of the role to copy to |
Definition at line 200 of file ezpolicy.php.
Referenced by createTemporaryCopy().
| static eZPolicy::create | ( | $ | roleID, |
| $ | module, | ||
| $ | function | ||
| ) | [static] |
Creates a new policy assigned to the role identified by ID $roleID and returns it.
| $module | Which module to give access to or true to give access to all modules. |
| $function | Which function to give access to or true to give access to all functions. |
| $limitations | An associative array with limitations and their values, use an empty array for no limitations. |
Definition at line 145 of file ezpolicy.php.
Referenced by appendLimitation().
| static eZPolicy::createNew | ( | $ | roleID, |
| $ | params = array() |
||
| ) | [static] |
Definition at line 120 of file ezpolicy.php.
Referenced by copy(), and eZStepCreateSites\initializePackage().
Creates a temporary copy for this policy so that it can be edited.
The policies will be linked to the copy
Definition at line 418 of file ezpolicy.php.
| static eZPolicy::definition | ( | ) | [static] |
Returns the definition for the object, the default implementation is to return an empty array.
It's upto each inheriting class to return a proper definition array.
The definition array is an associative array consists of these keys:
Example: public static function definition() { return array( "fields" => array( "id" => "ID", "version" => "Version", "name" => "Name" ), "keys" => array( "id", "version" ), "function_attributes" => array( "current" => "currentVersion", "class_name" => "className" ), "increment_key" => "id", "class_name" => "eZContentClass", "sort" => array( "id" => "asc" ), "name" => "ezcontentclass" ); }
Reimplemented from eZPersistentObject.
Definition at line 29 of file ezpolicy.php.
Referenced by eZRole\policyList().
| eZPolicy::eZPolicy | ( | $ | row | ) |
| static eZPolicy::fetch | ( | $ | policyID | ) | [static] |
Fetches a policy by ID.
| int | $policyID | Policy ID |
Definition at line 380 of file ezpolicy.php.
Referenced by eZSubtreeNotificationRule\checkObjectAccess(), fetchTemporaryCopy(), eZPolicyLimitation\policy(), removeByID(), and saveTemporary().
| static eZPolicy::fetchTemporaryCopy | ( | $ | policyID | ) | [static] |
Fetches the temporary copy of a policy.
| int | $policyID | The original policy ID |
Definition at line 391 of file ezpolicy.php.
| eZPolicy::limitationList | ( | $ | useCache = true, |
| $ | ignoreLimitIdentifier = false |
||
| ) |
Fetch limitation array()
| use | limitation cache, true by default. |
Definition at line 283 of file ezpolicy.php.
Referenced by accessArray().
Definition at line 67 of file ezpolicy.php.
Definition at line 72 of file ezpolicy.php.
| static eZPolicy::removeByID | ( | $ | id | ) | [static] |
Definition at line 221 of file ezpolicy.php.
| eZPolicy::removeThis | ( | $ | id = false | ) |
Definition at line 235 of file ezpolicy.php.
| eZPolicy::role | ( | ) |
Definition at line 364 of file ezpolicy.php.
Saves a temporary limitation created with createTemporaryCopy().
| Exception | The policy isn't a temporary one |
Definition at line 436 of file ezpolicy.php.
| eZPolicy::setAttribute | ( | $ | attr, |
| $ | val | ||
| ) |
Sets the attribute $attr to the value $val.
The attribute must be present in the objects definition fields or set functions.
| string | $attr | |
| mixed | $val |
Reimplemented from eZPersistentObject.
Definition at line 82 of file ezpolicy.php.
Referenced by saveTemporary().
Definition at line 77 of file ezpolicy.php.
| eZPolicy::$Disabled = false |
Definition at line 453 of file ezpolicy.php.
| eZPolicy::$LimitIdentifier |
Definition at line 455 of file ezpolicy.php.
| eZPolicy::$LimitValue |
Definition at line 454 of file ezpolicy.php.
| eZPolicy::$UserRoleID |
Definition at line 456 of file ezpolicy.php.