API16

JParameter/renderToArray: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: ===Description=== Render all parameters to an array <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki...
 
m preparing for archive only
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
Render all parameters to an array
Render all parameters to an array


<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JParameter/renderToArray|Edit Descripton]]<nowiki>]</nowiki>
</span>


{{Description:JParameter/renderToArray}}
 
 


===Syntax===
===Syntax===
Line 50: Line 48:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JParameter/renderToArray|Edit See Also]]<nowiki>]</nowiki>
 
</span>
{{SeeAlso:JParameter/renderToArray}}


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=renderToArray
  category=renderToArray
  category=JParameter
  category=JParameter
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>

Latest revision as of 01:58, 25 March 2017

Description

Render all parameters to an array



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



Examples

Code Examples