API16

API16:JParameter/renderToArray

From Joomla! Documentation

Revision as of 22:52, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Render all parameters to an array <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Render all parameters to an array

[Edit Descripton]

Template: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;
}

[Edit See Also] Template:SeeAlso:JParameter/renderToArray

Examples

<CodeExamplesForm />