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 desceandants 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($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 28
public void
save(PropelPDO $con = null)
If object is saved without left/right values, set them as undefined (0)
at line 37
public void
delete(PropelPDO $con = null)
Delete node and descendants
at line 45
public object
makeRoot()
Sets node properties to make it a root node.
at line 53
public int
getLevel(PropelPDO $con = null)
Gets the level if set, otherwise calculates this and returns it
at line 61
public array
getPath(PropelPDO $con = null)
Get the path to the node in the tree
at line 69
public int
getNumberOfChildren(PropelPDO $con = null)
Gets the number of children for the node (direct descendants)
at line 77
public int
getNumberOfDescendants(PropelPDO $con = null)
Gets the total number of desceandants for the node
at line 85
public array
getChildren(PropelPDO $con = null)
Gets the children for the node
at line 93
public array
getDescendants(PropelPDO $con = null)
Gets the descendants for the node
at line 101
public object
setLevel($level)
Sets the level of the node in the tree
at line 109
public object
setChildren(array $children)
Sets the children array of the node in the tree
at line 117
public object
setParentNode(NodeObject $parent = null)
Sets the parentNode of the node in the tree
at line 125
public object
setPrevSibling(NodeObject $node = null)
Sets the previous sibling of the node in the tree
at line 133
public object
setNextSibling(NodeObject $node = null)
Sets the next sibling of the node in the tree
at line 140
public bool
isRoot()
Determines if the node is the root node
at line 147
public bool
isLeaf()
Determines if the node is a leaf node
at line 155
public bool
isEqualTo(NodeObject $node)
Tests if object is equal to $node
at line 163
public bool
hasParent(PropelPDO $con = null)
Tests if object has an ancestor
at line 170
public bool
hasChildren()
Determines if the node has children / descendants
at line 178
public bool
hasPrevSibling(PropelPDO $con = null)
Determines if the node has previous sibling
at line 186
public bool
hasNextSibling(PropelPDO $con = null)
Determines if the node has next sibling
at line 194
public mixed
retrieveParent(PropelPDO $con = null)
Gets ancestor for the given node if it exists
at line 202
public mixed
retrieveFirstChild(PropelPDO $con = null)
Gets first child if it exists
at line 210
public mixed
retrieveLastChild(PropelPDO $con = null)
Gets last child if it exists
at line 218
public mixed
retrievePrevSibling(PropelPDO $con = null)
Gets prev sibling for the given node if it exists
at line 226
public mixed
retrieveNextSibling(PropelPDO $con = null)
Gets next sibling for the given node if it exists
at line 235
public object
insertAsFirstChildOf(NodeObject $parent, PropelPDO $con = null)
Inserts as first child of destination node $parent
at line 244
public object
insertAsLastChildOf(NodeObject $parent, PropelPDO $con = null)
Inserts as last child of destination node $parent
at line 253
public object
insertAsPrevSiblingOf(NodeObject $dest, PropelPDO $con = null)
Inserts node as previous sibling to destination node $dest
at line 262
public object
insertAsNextSiblingOf(NodeObject $dest, PropelPDO $con = null)
Inserts node as next sibling to destination node $dest
at line 271
public void
moveToFirstChildOf(NodeObject $parent, PropelPDO $con = null)
Moves node to be first child of $parent
at line 280
public void
moveToLastChildOf(NodeObject $parent, PropelPDO $con = null)
Moves node to be last child of $parent
at line 289
public void
moveToPrevSiblingOf(NodeObject $dest, PropelPDO $con = null)
Moves node to be prev sibling to $dest
at line 298
public void
moveToNextSiblingOf(NodeObject $dest, PropelPDO $con = null)
Moves node to be next sibling to $dest
at line 308
public void
insertAsParentOf(NodeObject $node, PropelPDO $con = null)
Inserts node as parent of given node.
at line 315
public int
getScopeIdValue()
Wraps the getter for the scope value
at line 323
public object
setScopeIdValue(int $v)
Set the value of scope column