function fetchElement($name, $value, &$node, $control_name) { $extensions = BeallitasokHelper::getExtensions(); $options = array(); foreach ($extensions as $extension) { $option = new stdClass(); $option->text = JText::_(ucfirst((string) $extension->name)); $option->value = (string) $extension->name; $options[] = $option; } return JHTML::_('select.genericlist', $options, '' . $control_name . '[' . $name . ']', 'class="inputbox"', 'value', 'text', $value, $control_name . $name); }
/** * Returns the options for extensions list * * @param string $ext - the extension */ public static function extensions($ext) { $extensions = BeallitasokHelper::getExtensions(); $options = array(); foreach ($extensions as $extension) { $option = new stdClass(); $option->text = JText::_(ucfirst($extension->name)); $option->value = 'com_beallitasok.' . $extension->name; $options[] = $option; } return JHtml::_('select.options', $options, 'value', 'text', $ext, true); }