Propel API
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 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)

Parameters

PropelPDO $con Connection to use.

Return Value

void

Exceptions

PropelException

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

Delete node and descendants

Parameters

PropelPDO $con Connection to use.

Return Value

void

Exceptions

PropelException

at line 45
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 53
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 61
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 69
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 77
public int getNumberOfDescendants(PropelPDO $con = null)

Gets the total number of desceandants for the node

Parameters

PropelPDO $con Connection to use.

Return Value

int

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

Gets the children for the node

Parameters

PropelPDO $con Connection to use.

Return Value

array

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

Gets the descendants for the node

Parameters

PropelPDO $con Connection to use.

Return Value

array

at line 101
public object setLevel($level)

Sets the level of the node in the tree

Parameters

$level

Return Value

object The current object (for fluent API support)

at line 109
public object setChildren(array $children)

Sets the children array of the node in the tree

Parameters

array $children of Node $children array of Propel node object

Return Value

object The current object (for fluent API support)

at line 117
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 125
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 133
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 140
public bool isRoot()

Determines if the node is the root node

Return Value

bool

at line 147
public bool isLeaf()

Determines if the node is a leaf node

Return Value

bool

at line 155
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 163
public bool hasParent(PropelPDO $con = null)

Tests if object has an ancestor

Parameters

PropelPDO $con Connection to use.

Return Value

bool

at line 170
public bool hasChildren()

Determines if the node has children / descendants

Return Value

bool

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

Determines if the node has previous sibling

Parameters

PropelPDO $con Connection to use.

Return Value

bool

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

Determines if the node has next sibling

Parameters

PropelPDO $con Connection to use.

Return Value

bool

at line 194
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 202
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 210
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 218
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 226
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 235
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 244
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 253
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 262
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 271
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 280
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 289
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 298
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 308
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 315
public int getScopeIdValue()

Wraps the getter for the scope value

Return Value

int

at line 323
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)