/** * Returns the options for extensions list * * @param string $ext - the extension */ public static function extensions($ext) { $extensions = AmmvcHelper::getExtensions(); $options = array(); foreach ($extensions as $extension) { $option = new stdClass(); $option->text = JText::_(ucfirst($extension->name)); $option->value = 'com_ammvc.' . $extension->name; $options[] = $option; } return JHtml::_('select.options', $options, 'value', 'text', $ext, true); }
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/ammvc.php'; //set the default view $controller = JRequest::getWord('view', 'amcomponents'); //add submenu AmmvcHelper::addSubmenu($controller); if (JRequest::getWord('task') == 'categoryedit') { $controller = 'category'; JRequest::setVar('task', 'edit'); JRequest::setVar('view', 'category'); $task = 'edit'; } $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 = '';