Stores a Mysqli object for further use
boolean
__construct
(object $mysqli)
-
object
$mysqli: Mysqli object
Creates the root node
boolean
createRootNode
(string $name)
-
string
$name: Name of the new node
Deletes a node an all it's children
boolean
deleteNode
(integer $id)
-
integer
$id: id of the node to delete
Deletes a node and increases the level of all children by one
boolean
deleteSingleNode
(integer $id)
-
integer
$id: id of the node to delete
Prints a error message
void
error
(int $id, [boolean $continue = false])
-
int
$id: array-key of the message
-
boolean
$continue: continue script or not
Gets the id of a node depending on it's lft value
integer
getIdLft
(integer $lft)
-
integer
$lft: lft value of the node
Gets the id of a node depending on it's rgt value
integer
getIdRgt
(integer $rgt)
-
integer
$rgt: rgt value of the node
Gets an object with all data of a node
object object
getNode
(integer $id)
-
integer
$id: id of the node
Gets a multidimensional array containing the path to defined node
array
getPath
(integer $id)
-
integer
$id: id of the node to which the path should point
Creates a multi-dimensional array of the whole tree
array
getTree
()
Creates a new child node of the node with the given id
boolean
insertChildNode
(string $name, integer $parent)
-
string
$name: name of the new node
-
integer
$parent: id of the parent node
Creates a new node
boolean
insertNode
(string $name, integer $lft, integer $rgt)
-
string
$name: name of the new node
-
integer
$lft: lft of parent node
-
integer
$rgt: rgt of parent node
Moves a node one position to the left staying in the same level
boolean
moveLft
($nodeId $nodeId)
-
$nodeId
$nodeId: id of the node to move
Moves a node one position to the right staying in the same level
boolean
moveRgt
($nodeId $nodeId)
-
$nodeId
$nodeId: id of the node to move
Get the HTML code for an unordered list of the tree
string
treeAsHtml
()