JParameter/renderToArray: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Render all parameters to an array
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki... |
m clean up |
||
| Line 2: | Line 2: | ||
Render all parameters to an array | Render all parameters to an array | ||
{{Description:JParameter/renderToArray}} | |||
{{subst:Description:JParameter/renderToArray}} | |||
===Syntax=== | ===Syntax=== | ||
| Line 50: | Line 48: | ||
</source> | </source> | ||
{{subst:SeeAlso:JParameter/renderToArray}} | |||
{{SeeAlso:JParameter/renderToArray}} | |||
===Examples=== | ===Examples=== | ||
Revision as of 14:18, 24 March 2017
Description
Render all parameters to an array
{{subst:Description:JParameter/renderToArray}}
Syntax
renderToArray($name= 'params', $group= '_default')
| Parameter Name | Default Value | Description |
|---|---|---|
| $name | 'params' | The name of the control, or the default text area if a setup file is not found |
| $group | '_default' |
Returns
array Array of all parameters, each as array Any array of the label, the form element and the tooltip
Defined in
libraries/joomla/html/parameter.php
Importing
jimport( 'joomla.html.parameter' );
Source Body
public function renderToArray($name = 'params', $group = '_default')
{
if (!isset($this->_xml[$group])) {
return false;
}
$results = array();
foreach ($this->_xml[$group]->children() as $param) {
$result = $this->getParam($param, $name, $group);
$results[$result[5]] = $result;
}
return $results;
}
{{subst:SeeAlso:JParameter/renderToArray}}
Examples
<CodeExamplesForm />