|
eZ Publish
[4.2]
|
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) | |
| eZPolicy ($row) | |
| limitationList ($useCache=true, $ignoreLimitIdentifier=false) | |
| limitIdentifier () | |
| limitValue () | |
| removeThis ($id=false) | |
| role () | |
| setAttribute ($attr, $val) | |
| userRoleID () | |
Static Public Member Functions | |
| static | create ($roleID, $module, $function) |
| static | createNew ($roleID, $params=array()) |
| static | definition () |
| static | fetch ($policyID) |
| static | removeByID ($id) |
Public Attributes | |
| $Disabled = false | |
| $LimitIdentifier | |
| $LimitValue | |
| $UserRoleID | |
Defines a policy in the permission system.
Definition at line 41 of file ezpolicy.php.
| eZPolicy::accessArray | ( | $ | ignoreLimitIdentifier = false | ) |
Generate access array from this policy.
return access array
Definition at line 268 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 186 of file ezpolicy.php.
| eZPolicy::copy | ( | $ | roleID | ) |
Definition at line 217 of file ezpolicy.php.
| 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 164 of file ezpolicy.php.
Referenced by appendLimitation().
| static eZPolicy::createNew | ( | $ | roleID, |
| $ | params = array() |
||
| ) | [static] |
Definition at line 139 of file ezpolicy.php.
Referenced by copy().
| static eZPolicy::definition | ( | ) | [static] |
The definition array is an associative array consists of these keys:
asc or desc.Example:
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 52 of file ezpolicy.php.
Referenced by fetch(), and eZRole\policyList().
| eZPolicy::eZPolicy | ( | $ | row | ) |
| static eZPolicy::fetch | ( | $ | policyID | ) | [static] |
Definition at line 390 of file ezpolicy.php.
Referenced by eZSubtreeNotificationRule\checkObjectAccess(), eZPolicyLimitation\policy(), and removeByID().
| eZPolicy::limitationList | ( | $ | useCache = true, |
| $ | ignoreLimitIdentifier = false |
||
| ) |
Fetch limitation array()
| use | limitation cache, true by default. |
Definition at line 298 of file ezpolicy.php.
Referenced by accessArray().
| eZPolicy::limitIdentifier | ( | ) |
Definition at line 86 of file ezpolicy.php.
| eZPolicy::limitValue | ( | ) |
Definition at line 91 of file ezpolicy.php.
| static eZPolicy::removeByID | ( | $ | id | ) | [static] |
Definition at line 236 of file ezpolicy.php.
| eZPolicy::removeThis | ( | $ | id = false | ) |
Definition at line 250 of file ezpolicy.php.
| eZPolicy::role | ( | ) |
Definition at line 379 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.
Reimplemented from eZPersistentObject.
Definition at line 101 of file ezpolicy.php.
| eZPolicy::userRoleID | ( | ) |
Definition at line 96 of file ezpolicy.php.
| eZPolicy::$Disabled = false |
Definition at line 397 of file ezpolicy.php.
| eZPolicy::$LimitIdentifier |
Definition at line 399 of file ezpolicy.php.
| eZPolicy::$LimitValue |
Definition at line 398 of file ezpolicy.php.
| eZPolicy::$UserRoleID |
Definition at line 400 of file ezpolicy.php.