API16

JElementRadio/fetchElement: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JElementRadio...
 
Doxiki (talk | contribs)
No edit summary
Line 23: Line 23:
|   
|   
|-
|-
|  
| &$node
|  
|  
|   
|   

Revision as of 10:14, 30 March 2010

[Edit Descripton]

Template:Description:JElementRadio/fetchElement

Syntax

fetchElement($name, $value, &$node, $control_name)
Parameter Name Default Value Description
$name
$value
&$node
$control_name

Defined in

libraries/joomla/html/parameter/element/radio.php

Importing

jimport( 'joomla.html.parameter.element.radio' );

Source Body

public function fetchElement($name, $value, &$node, $control_name)
{
        $options = array ();
        foreach ($node->children() as $option)
        {
                $val    = $option->attributes('value');
                $text   = $option->data();
                $options[] = JHtml::_('select.option', $val, $text);
        }

        return JHtml::_('select.radiolist', $options, ''.$control_name.'['.$name.']', '', 'value', 'text', $value, $control_name.$name, true);
}

[Edit See Also] Template:SeeAlso:JElementRadio/fetchElement

Examples

<CodeExamplesForm />