element['class'] ? ' class="radio ' . (string) $this->element['class'] . '"' : ' class="radio"'; // Start the radio field output. $html[] = '
'; return implode($html); } /** * Method to get the field options for radio buttons. * * @return array The field option objects. * * @since 11.1 */ protected function getOptions() { $options = array(); foreach ($this->element->children() as $option) { // Only add elements. if ($option->getName() != 'option') { continue; } // Create a new option object based on the element. $tmp = JHtml::_( 'select.option', (string) $option['value'], trim((string) $option), 'value', 'text', ((string) $option['disabled'] == 'true') ); // Set some option attributes. $tmp->class = (string) $option['class']; // Set some JavaScript option attributes. $tmp->onclick = (string) $option['onclick']; // Add the option object to the result set. $options[] = $tmp; } reset($options); return $options; } }