Property | Type | Description | |
---|---|---|---|
$asParent | boolean | Defines whether this request should be checked as a parent object. This means, it excludes all rules with sub=0 (rules that do not apply to sub-items/children) | |
$field | string | null | array | Example: 'title' or ['language' => 'en'] | |
$mode | integer | ACL::MODE_ALL, ACL::MODE_LISTING, ACL::MODE_VIEW, ACL::MODE_ADD, ACL::MODE_UPDATE, ACL::MODE_DELETE | |
$objectKey | string | Example: jarves/node | |
$primaryKey | array | string | null | If not defined, rules that have a constraint to a exactly object item are ignored. This includes: Rules that are applied to parent objects and have sub=true and exact rules that are applied to a particular object item. Actually only ACL::CONSTRAINT_ALL are checked then, usually needed for mode==ACL::LISTING String representation as seen in Jarves\Objects::normalizePkString also allowed and will be converted to a real primaryKey array when used. | |
$primaryObjectItem | null | array | When a primaryKey is given and we have rules based on fields of a object item, the ACL system needs to fetch this item based on $primaryKey. To speed things up and to check against not yet created objects (like during a 'add'-check), you should pass the actual objectItem to this request. | |
$rootHasAccess | boolean | For nested set, the ACL system iterates through all parents. If no rule applies or all rules are from access=inherited, then this option defines whether ACL::check() returns true or false. | |
$targetId | null | integer | If not defined current user id from current session is used. | |
$targetType | null | ACL::TARGET_TYPE_USER, ACL::TARGET_TYPE_GROUP |
Method | Description | |
---|---|---|
__construct ( string $objectKey, string | array | null $primaryKey = null ) | ||
create ( string $objectKey, string | array | null $primaryKey = null ) : static | ||
getField ( ) : array | null | string | ||
getMode ( ) : integer | ||
getObjectKey ( ) : string | ||
getPrimaryKey ( ) : array | null | ||
getPrimaryObjectItem ( ) : array | string | null | ||
getTargetId ( ) : integer | null | ||
getTargetType ( ) : null | ||
isAsParent ( ) : boolean | ||
isRootHasAccess ( ) : boolean | ||
onlyAddMode ( ) | ||
onlyDeleteMode ( ) | ||
onlyListingMode ( ) | ||
onlyUpdateMode ( ) | ||
onlyViewMode ( ) | ||
setAsParent ( boolean $asParent ) | ||
setField ( array | null | string $field ) | ||
setMode ( integer $mode ) | ||
setObjectKey ( string $objectKey ) | ||
setPrimaryKey ( string | array | null $primaryKey ) | ||
setPrimaryObjectItem ( array $primaryObjectItem = null ) | ||
setRootHasAccess ( boolean $rootHasAccess ) | ||
setTargetId ( integer | null $targetId ) | ||
setTargetType ( null $targetType ) | ||
targetGroup ( integer $groupId ) | Sets targetId= $groupId and targetType = ACL::TARGET_TYPE_GROUP | |
targetUser ( integer $userId ) | Sets targetId= $userId and targetType = ACL::TARGET_TYPE_USER |
public setPrimaryObjectItem ( array $primaryObjectItem = null ) | ||
$primaryObjectItem | array |
public setRootHasAccess ( boolean $rootHasAccess ) | ||
$rootHasAccess | boolean |
public setTargetId ( integer | null $targetId ) | ||
$targetId | integer | null |
public targetGroup ( integer $groupId ) | ||
$groupId | integer |
public targetUser ( integer $userId ) | ||
$userId | integer |
protected bool $asParent | ||
return | boolean |
protected int $mode | ||
return | integer |
protected bool $rootHasAccess | ||
return | boolean |
protected null $targetType | ||
return | null |