Exemplo n.º 1
0
 function fetchElement($name, $value, &$node, $control_name)
 {
     $extensions = KepviselokHelper::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);
 }
Exemplo n.º 2
0
 /**
  * Returns the options for extensions list
  * 
  * @param string $ext - the extension
  */
 public static function extensions($ext)
 {
     $extensions = KepviselokHelper::getExtensions();
     $options = array();
     foreach ($extensions as $extension) {
         $option = new stdClass();
         $option->text = JText::_(ucfirst($extension->name));
         $option->value = 'com_kepviselok.' . $extension->name;
         $options[] = $option;
     }
     return JHtml::_('select.options', $options, 'value', 'text', $ext, true);
 }
Exemplo n.º 3
0
    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/kepviselok.php';
//set the default view
$controller = JRequest::getWord('view', 'kepviselok');
//add submenu
KepviselokHelper::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 = 'KepviselokController' . $controller;
$controller = new $classname($ControllerConfig);
// Perform the Request task