JParameter/setXML: Difference between revisions
From Joomla! Documentation
No edit summary |
m clean up |
||
| Line 2: | Line 2: | ||
Sets the XML object from custom xml files. | Sets the XML object from custom xml files. | ||
{{Description:JParameter/setXML}} | |||
{{subst:Description:JParameter/setXML}} | |||
===Syntax=== | ===Syntax=== | ||
| Line 45: | Line 43: | ||
</source> | </source> | ||
{{subst:SeeAlso:JParameter/setXML}} | |||
{{SeeAlso:JParameter/setXML}} | |||
===Examples=== | ===Examples=== | ||
Revision as of 14:18, 24 March 2017
Description
Sets the XML object from custom xml files.
{{subst:Description:JParameter/setXML}}
Syntax
setXML(&$xml)
| Parameter Name | Default Value | Description |
|---|---|---|
| &$xml | An XML object. |
Defined in
libraries/joomla/html/parameter.php
Importing
jimport( 'joomla.html.parameter' );
Source Body
public function setXML(&$xml)
{
if (is_object($xml)) {
if ($group = $xml->attributes('group')) {
$this->_xml[$group] = $xml;
} else {
$this->_xml['_default'] = $xml;
}
if ($dir = $xml->attributes('addpath')) {
$this->addElementPath(JPATH_ROOT . str_replace('/', DS, $dir));
}
}
}
{{subst:SeeAlso:JParameter/setXML}}
Examples
<CodeExamplesForm />