interface NodeObject implements IteratorAggregate
This interface defines methods that must be implemented by all business objects within the system to handle Node object.
Methods
void |
save(PropelPDO $con = null)
If object is saved without left/right values, set them as undefined (0) |
|
void |
delete(PropelPDO $con = null)
Delete node and descendants |
|
object |
makeRoot()
Sets node properties to make it a root node. |
|
int |
getLevel(PropelPDO $con = null)
Gets the level if set, otherwise calculates this and returns it |
|
array |
getPath(PropelPDO $con = null)
Get the path to the node in the tree |
|
int |
getNumberOfChildren(PropelPDO $con = null)
Gets the number of children for the node (direct descendants) |
|
int |
getNumberOfDescendants(PropelPDO $con = null)
Gets the total number of descendants for the node |
|
array |
getChildren(PropelPDO $con = null)
Gets the children for the node |
|
array |
getDescendants(PropelPDO $con = null)
Gets the descendants for the node |
|
object |
setLevel(int $level)
Sets the level of the node in the tree |
|
object |
setChildren(array $children)
Sets the children array of the node in the tree |
|
object |
setParentNode(NodeObject $parent = null)
Sets the parentNode of the node in the tree |
|
object |
setPrevSibling(NodeObject $node = null)
Sets the previous sibling of the node in the tree |
|
object |
setNextSibling(NodeObject $node = null)
Sets the next sibling of the node in the tree |
|
bool |
isRoot()
Determines if the node is the root node |
|
bool |
isLeaf()
Determines if the node is a leaf node |
|
bool |
isEqualTo(NodeObject $node)
Tests if object is equal to $node |
|
bool |
hasParent(PropelPDO $con = null)
Tests if object has an ancestor |
|
bool |
hasChildren()
Determines if the node has children / descendants |
|
bool |
hasPrevSibling(PropelPDO $con = null)
Determines if the node has previous sibling |
|
bool |
hasNextSibling(PropelPDO $con = null)
Determines if the node has next sibling |
|
mixed |
retrieveParent(PropelPDO $con = null)
Gets ancestor for the given node if it exists |
|
mixed |
retrieveFirstChild(PropelPDO $con = null)
Gets first child if it exists |
|
mixed |
retrieveLastChild(PropelPDO $con = null)
Gets last child if it exists |
|
mixed |
retrievePrevSibling(PropelPDO $con = null)
Gets prev sibling for the given node if it exists |
|
mixed |
retrieveNextSibling(PropelPDO $con = null)
Gets next sibling for the given node if it exists |
|
object |
insertAsFirstChildOf(NodeObject $parent, PropelPDO $con = null)
Inserts as first child of destination node $parent |
|
object |
insertAsLastChildOf(NodeObject $parent, PropelPDO $con = null)
Inserts as last child of destination node $parent |
|
object |
insertAsPrevSiblingOf(NodeObject $dest, PropelPDO $con = null)
Inserts node as previous sibling to destination node $dest |
|
object |
insertAsNextSiblingOf(NodeObject $dest, PropelPDO $con = null)
Inserts node as next sibling to destination node $dest |
|
void |
moveToFirstChildOf(NodeObject $parent, PropelPDO $con = null)
Moves node to be first child of $parent |
|
void |
moveToLastChildOf(NodeObject $parent, PropelPDO $con = null)
Moves node to be last child of $parent |
|
void |
moveToPrevSiblingOf(NodeObject $dest, PropelPDO $con = null)
Moves node to be prev sibling to $dest |
|
void |
moveToNextSiblingOf(NodeObject $dest, PropelPDO $con = null)
Moves node to be next sibling to $dest |
|
void |
insertAsParentOf(NodeObject $node, PropelPDO $con = null)
Inserts node as parent of given node. |
|
int |
getScopeIdValue()
Wraps the getter for the scope value |
|
object |
setScopeIdValue(int $v)
Set the value of scope column |
Details
at line 29
public void
save(PropelPDO $con = null)
If object is saved without left/right values, set them as undefined (0)
at line 39
public void
delete(PropelPDO $con = null)
Delete node and descendants
at line 47
public object
makeRoot()
Sets node properties to make it a root node.
at line 56
public int
getLevel(PropelPDO $con = null)
Gets the level if set, otherwise calculates this and returns it
at line 65
public array
getPath(PropelPDO $con = null)
Get the path to the node in the tree
at line 74
public int
getNumberOfChildren(PropelPDO $con = null)
Gets the number of children for the node (direct descendants)
at line 83
public int
getNumberOfDescendants(PropelPDO $con = null)
Gets the total number of descendants for the node
at line 92
public array
getChildren(PropelPDO $con = null)
Gets the children for the node
at line 101
public array
getDescendants(PropelPDO $con = null)
Gets the descendants for the node
at line 110
public object
setLevel(int $level)
Sets the level of the node in the tree
at line 119
public object
setChildren(array $children)
Sets the children array of the node in the tree
at line 128
public object
setParentNode(NodeObject $parent = null)
Sets the parentNode of the node in the tree
at line 137
public object
setPrevSibling(NodeObject $node = null)
Sets the previous sibling of the node in the tree
at line 146
public object
setNextSibling(NodeObject $node = null)
Sets the next sibling of the node in the tree
at line 153
public bool
isRoot()
Determines if the node is the root node
at line 160
public bool
isLeaf()
Determines if the node is a leaf node
at line 169
public bool
isEqualTo(NodeObject $node)
Tests if object is equal to $node
at line 178
public bool
hasParent(PropelPDO $con = null)
Tests if object has an ancestor
at line 185
public bool
hasChildren()
Determines if the node has children / descendants
at line 194
public bool
hasPrevSibling(PropelPDO $con = null)
Determines if the node has previous sibling
at line 203
public bool
hasNextSibling(PropelPDO $con = null)
Determines if the node has next sibling
at line 212
public mixed
retrieveParent(PropelPDO $con = null)
Gets ancestor for the given node if it exists
at line 221
public mixed
retrieveFirstChild(PropelPDO $con = null)
Gets first child if it exists
at line 230
public mixed
retrieveLastChild(PropelPDO $con = null)
Gets last child if it exists
at line 239
public mixed
retrievePrevSibling(PropelPDO $con = null)
Gets prev sibling for the given node if it exists
at line 248
public mixed
retrieveNextSibling(PropelPDO $con = null)
Gets next sibling for the given node if it exists
at line 258
public object
insertAsFirstChildOf(NodeObject $parent, PropelPDO $con = null)
Inserts as first child of destination node $parent
at line 268
public object
insertAsLastChildOf(NodeObject $parent, PropelPDO $con = null)
Inserts as last child of destination node $parent
at line 278
public object
insertAsPrevSiblingOf(NodeObject $dest, PropelPDO $con = null)
Inserts node as previous sibling to destination node $dest
at line 288
public object
insertAsNextSiblingOf(NodeObject $dest, PropelPDO $con = null)
Inserts node as next sibling to destination node $dest
at line 298
public void
moveToFirstChildOf(NodeObject $parent, PropelPDO $con = null)
Moves node to be first child of $parent
at line 308
public void
moveToLastChildOf(NodeObject $parent, PropelPDO $con = null)
Moves node to be last child of $parent
at line 318
public void
moveToPrevSiblingOf(NodeObject $dest, PropelPDO $con = null)
Moves node to be prev sibling to $dest
at line 328
public void
moveToNextSiblingOf(NodeObject $dest, PropelPDO $con = null)
Moves node to be next sibling to $dest
at line 339
public void
insertAsParentOf(NodeObject $node, PropelPDO $con = null)
Inserts node as parent of given node.
at line 346
public int
getScopeIdValue()
Wraps the getter for the scope value
at line 355
public object
setScopeIdValue(int $v)
Set the value of scope column