JElementRadio/fetchElement: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
Line 52: | Line 52: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=fetchElement | category=fetchElement | ||
category=JElementRadio | category=JElementRadio | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* |
Latest revision as of 01:35, 25 March 2017
<! removed transcluded page call, red link never existed >
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);
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples