API16

JTree/addChild: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
No edit summary
m preparing for archive only
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JTree/addChild|Edit Descripton]]<nowiki>]</nowiki>
</span>
{{Description:JTree/addChild}}
===Syntax===
===Syntax===
<source lang="php">addChild(&$node, $setCurrent=false)</source>
<source lang="php">addChild(&$node, $setCurrent=false)</source>
Line 40: Line 33:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JTree/addChild|Edit See Also]]<nowiki>]</nowiki>
 
</span>
{{SeeAlso:JTree/addChild}}


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=addChild
  category=addChild
  category=JTree
  category=JTree
  category=CodeExample
  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