API16

JNode/addChild

From Joomla! Documentation

< API16:JNode
Revision as of 05:00, 30 March 2010 by Doxiki (talk | contribs)

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Add child to this node

[Edit Descripton]

Template:Description:JNode/addChild

Syntax[edit]

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

Defined in[edit]

libraries/joomla/base/node.php

Importing[edit]

jimport( 'joomla.base.node' );

Source Body[edit]

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

[Edit See Also] Template:SeeAlso:JNode/addChild

Examples[edit]

<CodeExamplesForm />