AclNode Class Reference

Public Member Functions | |
| _resolveID ($id) | |
| _syncTable ($dir, $lft, $rght) | |
| create ($linkId=0, $parentId=null, $alias= '') | |
| delete ($id) | |
| getChildren ($id) | |
| getParent ($id) | |
| getPath ($id) | |
| id ($alias) | |
| setParent ($parentId=null, $id=null) | |
Public Attributes | |
| $cacheQueries = false | |
| $useDbConfig = ACL_DATABASE | |
Detailed Description
Definition at line 42 of file aclnode.php.
Member Function Documentation
| AclNode::_resolveID | ( | $ | id | ) |
Gets a conditions array to find an Aro or Aco, based on the given id or alias
- Parameters:
-
mixed $id
- Returns:
- array Conditions array for a find/findAll call public
Definition at line 259 of file aclnode.php.
References Model::$id.
Referenced by create(), delete(), getChildren(), getPath(), and setParent().
| AclNode::_syncTable | ( | $ | dir, | |
| $ | lft, | |||
| $ | rght | |||
| ) |
Shifts the left and right values of the aro/aco tables when a node is added or removed
- Parameters:
-
unknown_type $dir unknown_type $lft unknown_type $rght protected
Definition at line 273 of file aclnode.php.
References ConnectionManager::getDataSource().
Referenced by create(), and setParent().
| AclNode::create | ( | $ | linkId = 0, |
|
| $ | parentId = null, |
|||
| $ | alias = '' | |||
| ) |
Creates a new ARO/ACO node
- Parameters:
-
int $linkId mixed $parentId string $alias
- Returns:
- boolean True on success, false on fail public
Definition at line 64 of file aclnode.php.
References Model::$alias, _resolveID(), _syncTable(), Model::find(), Model::getLastInsertID(), and Model::save().
| AclNode::delete | ( | $ | id | ) |
Deletes the ARO/ACO node with the given ID
- Parameters:
-
mixed $id The id or alias of an ARO/ACO node
- Returns:
- boolean True on success, false on fail public
Definition at line 113 of file aclnode.php.
References Model::$id, Model::$table, _resolveID(), Set::extract(), Model::find(), Model::findAll(), ConnectionManager::getDataSource(), and Model::query().
| AclNode::getChildren | ( | $ | id | ) |
Get the child nodes of the given Aro or Aco
- Parameters:
-
mixed $id
- Returns:
- array public
Definition at line 242 of file aclnode.php.
References Model::$id, _resolveID(), Model::find(), and Model::findAll().
| AclNode::getParent | ( | $ | id | ) |
Get the parent node of the given Aro or Aco
- Parameters:
-
moxed $id
- Returns:
- array public
Definition at line 207 of file aclnode.php.
References Model::$id, and getPath().
Referenced by setParent().
| AclNode::getPath | ( | $ | id | ) |
Gets the path to the given Aro or Aco
- Parameters:
-
mixed $id
- Returns:
- array public
Definition at line 222 of file aclnode.php.
References Model::$id, _resolveID(), Model::find(), and Model::findAll().
Referenced by getParent().
| AclNode::id | ( | $ | alias | ) |
Get the ARO/ACO ID with the given alias
- Parameters:
-
mixed $alias The alias of an ARO/ACO node
- Returns:
- mixed The ID of an ARO/ACO node, or false if not found. public
Definition at line 102 of file aclnode.php.
References Model::$alias, and Model::find().
Referenced by setParent().
| AclNode::setParent | ( | $ | parentId = null, |
|
| $ | id = null | |||
| ) |
Sets the parent of the given node
- Parameters:
-
mixed $parentId mixed $id
- Returns:
- boolean True on success, false on failure public
Definition at line 145 of file aclnode.php.
References Model::$id, _resolveID(), _syncTable(), Model::find(), getParent(), id(), and Model::save().
Member Data Documentation
| AclNode::$cacheQueries = false |
| AclNode::$useDbConfig = ACL_DATABASE |
The documentation for this class was generated from the following file:
- /cake_1.1.19.6305/cake/libs/controller/components/dbacl/models/aclnode.php