Actions

API16

Difference between revisions of "JNode/addChild"

From Joomla! Documentation

< API16:JNode
(New page: ===Description=== Add child to this node <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> ...)
 
 
Line 17: Line 17:
 
!Description
 
!Description
 
|-
 
|-
|  
+
| &$child
 
|  
 
|  
 
|  the child to be added  
 
|  the child to be added  

Latest revision as of 05:00, 30 March 2010

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Add child to this node

[Edit Descripton]

Description:JNode/addChild

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);
        }
}

[Edit See Also] SeeAlso:JNode/addChild

Examples

<CodeExamplesForm />