Tree which contains Nodes.
The tree is the overarching container for a set of nodes. The nodes are the actual structure within the tree. The nodes in turn can have members which are the programmer-defined objects the system is interested in 'positioning' of. Members should impliment TreeNodeMemberInterface.
| package | dstruct_tree |
|---|---|
| author | David |
__construct(array $row)
arrayInformation to populate object.
getID() : integer
integergetMaxNodeDepth() : integer
integergetName(string $raw) : string
stringHTML formatted or raw.
stringgetNodesAcceptingMembers() : \TreeNodes
Useful if producing a 'flat' set of options e.g. a standard drop-down As this just deligates to a TreeNodes object, this is just in Tree class for convenience - usually just make the call to TreeNodes yourself
loadByID(integer $id, array $row) : false | \Tree
integer
arrayData to populate object
false\TreeFalse if can't find tree with that IDsave()
setMaxNodeDepth(integer $depth)
setName(string $name)
string
setSortOrder(integer $sortorder)
Trees can be ordered and given preference in the syste. A lower number is a higher preference.
| todo | Define the acceptable range |
|---|
integer
\DStructGeneralException |
|---|
insert()
update()
$id : integer
$maxnodedepth : integer
$name : string
$sortorder : integer
| see | \setSortOrder() |
|---|