DB_NestedSet::createRightNode()

DB_NestedSet::createRightNode()  -- Creates a node after a given node

Synopsis

require_once 'DB/NestedSet.php';

mixed DB_NestedSet::createRightNode (int $id, array $values, bool $returnID)

Description


 +-- root1
 |
 +-\ root2
 | |
 | |-- subnode1 [target]
 | |-- subnode2 [new]
 | |-- subnode3
 |
 +-- root3

Paramètres

entier $id

Target node ID

array $values

Hash with param => value pairs of the node (see $this->params)

booléen $returnID

Tell the method to return a node id instead of an object. ATTENTION: That the method defaults to return an object instead of the node id has been overseen and is basically a bug. We have to keep this to maintain BC. You will have to set $returnID to TRUE to make it behave like the other creation methods. This flaw will get fixed with the next major version.

Valeur retournée

returns The node id or false on error

Valeurs renvoyées

throws no exceptions thrown

Note

Cette fonction ne peut pas être appelée de façon statique.

Exemple