API15:JTree
From Joomla! Documentation
[Edit Descripton] Template:Description:JTree
Defined in
libraries/joomla/base/tree.php
Methods
| Method name | Description |
|---|---|
| __construct | Class constructor, overridden in descendant classes. |
| addChild | |
| getParent | |
| reset |
Importing
jimport( 'joomla.base.tree' );
[Edit See Also] Template:SeeAlso:JTree
Examples
<CodeExamplesForm />
JTree and JNode can be used to create and process simple tree structures. Let's see how this works for JTree with a simple example.
We want to create the Family Tree of the Smiths. Granny Barbara has two daughters. Stefanie and Aunti Sue. Stefanie has two children, Peter and Stewie. Auntie Sue doesn't have children.
Let's take a look how we can represent this familiy in an object tree.