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)
array
Information to populate object.
getID() : integer
integer
getMaxNodeDepth() : integer
integer
getName(string $raw) : string
string
HTML formatted or raw.
string
getNodesAcceptingMembers() : \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
array
Data to populate object
false
\Tree
False 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() |
---|