/** * Returns the options for extensions list * * @param string $ext - the extension */ public static function extensions($ext) { $extensions = TagokHelper::getExtensions(); $options = array(); foreach ($extensions as $extension) { $option = new stdClass(); $option->text = JText::_(ucfirst($extension->name)); $option->value = 'com_tagok.' . $extension->name; $options[] = $option; } return JHtml::_('select.options', $options, 'value', 'text', $ext, true); }
function fetchElement($name, $value, &$node, $control_name) { $extensions = TagokHelper::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); }
define('DS', '/'); } // Require the base controller require_once JPATH_COMPONENT . '/controller.php'; jimport('joomla.application.component.model'); require_once JPATH_COMPONENT . '/models/model.php'; // Component Helper jimport('joomla.application.component.helper'); //add Helperpath to JHTML JHTML::addIncludePath(JPATH_COMPONENT . '/helpers'); //include Helper require_once JPATH_COMPONENT . '/helpers/tagok.php'; //set the default view $controller = JRequest::getWord('view', 'tagok'); //add submenu TagokHelper::addSubmenu($controller); $ControllerConfig = array(); // Require specific controller if requested if ($controller) { $path = JPATH_COMPONENT . '/controllers/' . $controller . '.php'; $ControllerConfig = array('viewname' => strtolower($controller), 'mainmodel' => strtolower($controller), 'itemname' => ucfirst(strtolower($controller))); if (file_exists($path)) { require_once $path; } else { $controller = ''; } } // Create the controller $classname = 'TagokController' . $controller; $controller = new $classname($ControllerConfig); // Perform the Request task