Interface

NodeObject

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)

Parameters

PropelPDO $con Connection to use.

Return Value

void

Exceptions

PropelException

at line 39
public void delete(PropelPDO $con = null)

Delete node and descendants

Parameters

PropelPDO $con Connection to use.

Return Value

void

Exceptions

PropelException

at line 47
public object makeRoot()

Sets node properties to make it a root node.

Return Value

object The current object (for fluent API support)

Exceptions

PropelException

at line 56
public int getLevel(PropelPDO $con = null)

Gets the level if set, otherwise calculates this and returns it

Parameters

PropelPDO $con Connection to use.

Return Value

int

at line 65
public array getPath(PropelPDO $con = null)

Get the path to the node in the tree

Parameters

PropelPDO $con Connection to use.

Return Value

array

at line 74
public int getNumberOfChildren(PropelPDO $con = null)

Gets the number of children for the node (direct descendants)

Parameters

PropelPDO $con Connection to use.

Return Value

int

at line 83
public int getNumberOfDescendants(PropelPDO $con = null)

Gets the total number of descendants for the node

Parameters

PropelPDO $con Connection to use.

Return Value

int

at line 92
public array getChildren(PropelPDO $con = null)

Gets the children for the node

Parameters

PropelPDO $con Connection to use.

Return Value

array

at line 101
public array getDescendants(PropelPDO $con = null)

Gets the descendants for the node

Parameters

PropelPDO $con Connection to use.

Return Value

array

at line 110
public object setLevel(int $level)

Sets the level of the node in the tree

Parameters

int $level new value

Return Value

object The current object (for fluent API support)

at line 119
public object setChildren(array $children)

Sets the children array of the node in the tree

Parameters

array $children array of Propel node object

Return Value

object The current object (for fluent API support)

at line 128
public object setParentNode(NodeObject $parent = null)

Sets the parentNode of the node in the tree

Parameters

NodeObject $parent Propel node object

Return Value

object The current object (for fluent API support)

at line 137
public object setPrevSibling(NodeObject $node = null)

Sets the previous sibling of the node in the tree

Parameters

NodeObject $node Propel node object

Return Value

object The current object (for fluent API support)

at line 146
public object setNextSibling(NodeObject $node = null)

Sets the next sibling of the node in the tree

Parameters

NodeObject $node Propel node object

Return Value

object The current object (for fluent API support)

at line 153
public bool isRoot()

Determines if the node is the root node

Return Value

bool

at line 160
public bool isLeaf()

Determines if the node is a leaf node

Return Value

bool

at line 169
public bool isEqualTo(NodeObject $node)

Tests if object is equal to $node

Parameters

NodeObject $node Propel object for node to compare to

Return Value

bool

at line 178
public bool hasParent(PropelPDO $con = null)

Tests if object has an ancestor

Parameters

PropelPDO $con Connection to use.

Return Value

bool

at line 185
public bool hasChildren()

Determines if the node has children / descendants

Return Value

bool

at line 194
public bool hasPrevSibling(PropelPDO $con = null)

Determines if the node has previous sibling

Parameters

PropelPDO $con Connection to use.

Return Value

bool

at line 203
public bool hasNextSibling(PropelPDO $con = null)

Determines if the node has next sibling

Parameters

PropelPDO $con Connection to use.

Return Value

bool

at line 212
public mixed retrieveParent(PropelPDO $con = null)

Gets ancestor for the given node if it exists

Parameters

PropelPDO $con Connection to use.

Return Value

mixed Propel object if exists else false

at line 221
public mixed retrieveFirstChild(PropelPDO $con = null)

Gets first child if it exists

Parameters

PropelPDO $con Connection to use.

Return Value

mixed Propel object if exists else false

at line 230
public mixed retrieveLastChild(PropelPDO $con = null)

Gets last child if it exists

Parameters

PropelPDO $con Connection to use.

Return Value

mixed Propel object if exists else false

at line 239
public mixed retrievePrevSibling(PropelPDO $con = null)

Gets prev sibling for the given node if it exists

Parameters

PropelPDO $con Connection to use.

Return Value

mixed Propel object if exists else false

at line 248
public mixed retrieveNextSibling(PropelPDO $con = null)

Gets next sibling for the given node if it exists

Parameters

PropelPDO $con Connection to use.

Return Value

mixed Propel object if exists else false

at line 258
public object insertAsFirstChildOf(NodeObject $parent, PropelPDO $con = null)

Inserts as first child of destination node $parent

Parameters

NodeObject $parent Propel object for given destination node
PropelPDO $con Connection to use.

Return Value

object The current object (for fluent API support)

at line 268
public object insertAsLastChildOf(NodeObject $parent, PropelPDO $con = null)

Inserts as last child of destination node $parent

Parameters

NodeObject $parent Propel object for given destination node
PropelPDO $con Connection to use.

Return Value

object The current object (for fluent API support)

at line 278
public object insertAsPrevSiblingOf(NodeObject $dest, PropelPDO $con = null)

Inserts node as previous sibling to destination node $dest

Parameters

NodeObject $dest Propel object for given destination node
PropelPDO $con Connection to use.

Return Value

object The current object (for fluent API support)

at line 288
public object insertAsNextSiblingOf(NodeObject $dest, PropelPDO $con = null)

Inserts node as next sibling to destination node $dest

Parameters

NodeObject $dest Propel object for given destination node
PropelPDO $con Connection to use.

Return Value

object The current object (for fluent API support)

at line 298
public void moveToFirstChildOf(NodeObject $parent, PropelPDO $con = null)

Moves node to be first child of $parent

Parameters

NodeObject $parent Propel object for destination node
PropelPDO $con Connection to use.

Return Value

void

at line 308
public void moveToLastChildOf(NodeObject $parent, PropelPDO $con = null)

Moves node to be last child of $parent

Parameters

NodeObject $parent Propel object for destination node
PropelPDO $con Connection to use.

Return Value

void

at line 318
public void moveToPrevSiblingOf(NodeObject $dest, PropelPDO $con = null)

Moves node to be prev sibling to $dest

Parameters

NodeObject $dest Propel object for destination node
PropelPDO $con Connection to use.

Return Value

void

at line 328
public void moveToNextSiblingOf(NodeObject $dest, PropelPDO $con = null)

Moves node to be next sibling to $dest

Parameters

NodeObject $dest Propel object for destination node
PropelPDO $con Connection to use.

Return Value

void

at line 339
public void insertAsParentOf(NodeObject $node, PropelPDO $con = null)

Inserts node as parent of given node.

Parameters

NodeObject $node Propel object for given destination node
PropelPDO $con Connection to use.

Return Value

void

Exceptions

Exception When trying to insert node as parent of a root node

at line 346
public int getScopeIdValue()

Wraps the getter for the scope value

Return Value

int

at line 355
public object setScopeIdValue(int $v)

Set the value of scope column

Parameters

int $v new value

Return Value

object The current object (for fluent API support)