Doctrine_Tree_NestedSet __construct(
Doctrine_Table
$table, array
$options
)
|
|
constructor, creates tree with reference to table and sets default root options
Parameters:
object |
$table: |
instance of Doctrine_Table |
array |
$options: |
options |
API Tags:
Redefinition of:
- Doctrine_Tree::__construct()
- constructor, creates tree with reference to table and any options
creates root node from given record or from a new record
Parameters:
object |
$record: |
instance of Doctrine_Record |
API Tags:
Implementation of:
- Doctrine_Tree_Interface::createRoot()
- creates root node from given record or from a new record
mixed fetchBranch(
mixed
$pk, [array
$options = array()]
)
|
|
Fetches a branch of a tree.
Parameters:
mixed |
$pk: |
primary key as used by table::find() to locate node to traverse tree from |
array |
$options: |
Options. |
API Tags:
Return: | The branch or FALSE if the branch could not be found. |
Access: | public |
Information Tags:
Todo: | Only fetch the lft and rgt values of the initial record. more is not needed. |
Implementation of:
- Doctrine_Tree_Interface::fetchBranch()
- optimised method that returns iterator for traversal of the tree from the given record primary key
void fetchRoot(
[integer
$rootId = 1]
)
|
|
Fetches a/the root node.
Parameters:
API Tags:
Fetches all root nodes. If the tree has only one root this is the same as fetchRoot().
API Tags:
Return: | The root nodes. |
Access: | public |
mixed fetchTree(
[array
$options = array()]
)
|
|
Fetches a tree.
Parameters:
API Tags:
Return: | The tree or FALSE if the tree could not be found. |
Access: | public |
Implementation of:
- Doctrine_Tree_Interface::fetchTree()
- optimised method to returns iterator for traversal of the entire tree from root
object findRoot(
[
$rootId = 1]
)
|
|
returns root node
Parameters:
API Tags:
Return: | instance of Doctrine_Record |
Deprecated: | Use fetchRoot() |
Access: | public |
Implementation of:
- Doctrine_Tree_Interface::findRoot()
- returns root node
Enter description here...
API Tags:
unknown getBaseQuery(
array
$options
)
|
|
Enter description here...
Parameters:
API Tags:
calculates the current max root id
API Tags:
calculates the next available root id
API Tags:
Enter description here...
API Tags:
returns parsed query with root id where clause added if applicable
Parameters:
object |
$query: |
Doctrine_Query |
integer |
$root_id: |
id of destination root |
|
$rootId: |
|
API Tags:
Enter description here...
Parameters:
API Tags:
void setTableDefinition(
)
|
|
used to define table attributes required for the NestetSet implementation
adds lft and rgt columns for corresponding left and right values
API Tags:
Redefinition of:
- Doctrine_Tree::setTableDefinition()
- Used to define table attributes required for the given implementation
Enter description here...
API Tags: