API16

JNode/addChild: Difference between revisions

From Joomla! Documentation

m clean up
m preparing for archive only
 
Line 4: Line 4:




{{subst:Description:JNode/addChild}}
 


===Syntax===
===Syntax===
Line 37: Line 37:




{{subst:SeeAlso:JNode/addChild}}
 


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=addChild
  category=addChild
  category=JNode
  category=JNode
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>

Latest revision as of 01:55, 25 March 2017

Description

Add child to this node



Syntax

addChild(&$child)
Parameter Name Default Value Description
&$child the child to be added

Defined in

libraries/joomla/base/node.php

Importing

jimport( 'joomla.base.node' );

Source Body

function addChild(&$child) 
{
        if ($child instanceof Jnode) 
        {
                $child->setParent($this);
        }
}



Examples

Code Examples