Nodes of a {@link Tree} structure.
While the Tree is the overarching container of the nodes. The nodes themselves are the actual structure and organisation and contain the members. The members are usually programmer created objects which impliment TreeNodeMemberInterface. Maximum level of nodes = 255
package | dstruct_tree |
---|---|
author | David |
__construct(array $row)
array
Data to populate object with.
addChild()
todo | Impliment addChild() |
---|
getID() : integer
integer
getLevel() : integer
Maximum allowable level is 255.
integer
getName(string $raw) : string
string
HTML encoded or raw.
string
getParent() : object
object
getParentID() : integer
integer
getSiblings()
todo | Impliment getSiblings() |
---|
getSortOrder() : \number
Trees can be ordered and given preference in the syste. A lower number is a higher preference.
todo | Define the acceptable range |
---|
\number
getTreeID() : integer
integer
hasChildren() : boolean
boolean
loadByID(integer $id, array $row) : false | \TreeNode
integer
ID of object to load
array
Data to populate object
false
\TreeNode
False if can't find object with that IDsave()
setAcceptsMembers(boolean $accepts)
Nodes will usually be populated with members which are defined by the user and impliment TreeNodeMemberInterface. It may be desirable to restrict the ability for members to be added to a node, however, Set this to false to stop any members being added.
boolean
setName(string $name)
string
setSortOrder(integer $sortorder)
Nodes can be ordered and given preference in the system. A lower number is a higher preference.
todo | Define the acceptable range |
---|
integer
\DStructGeneralException |
---|
insert()
loadChildren()
loadParent()
loadTree()
update()
$acceptsmembers : integer
$children : \TreeNodes
$id : integer
$level : integer
$members : Object
$name : string
$parent : object
$parentid : integer
$sortorder : integer
see | \setSortOrder() |
---|
$tree : \Tree
$treeid : integer