JTree/addChild: Difference between revisions
From Joomla! Documentation
No edit summary |
m preparing for archive only |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
===Syntax=== | ===Syntax=== | ||
<source lang="php">addChild(&$node, $setCurrent=false)</source> | <source lang="php">addChild(&$node, $setCurrent=false)</source> | ||
Line 40: | Line 33: | ||
</source> | </source> | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=addChild | category=addChild | ||
category=JTree | category=JTree | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> |
Latest revision as of 02:13, 25 March 2017
Syntax
addChild(&$node, $setCurrent=false)
Parameter Name | Default Value | Description |
---|---|---|
&$node | ||
$setCurrent | false |
Defined in
libraries/joomla/base/tree.php
Importing
jimport( 'joomla.base.tree' );
Source Body
function addChild(&$node, $setCurrent = false)
{
$this->_current->addChild($node);
if ($setCurrent) {
$this->_current = &$node;
}
}
Examples
Code Examples