getTarget('action'); $request = $system->getRequest(); $method = 'run' . ucfirst($activeAction); if(method_exists($this, $method)) $this->$method($request, $response); else throw new PageNotFoundException($activeAction); } protected function getLanguageArray($basedir, $locale) { $lang = array_from_file($basedir.__DS__.'locale'.__DS__.'_default_.php','lang'); if ($locale != '_default_' && file_exists($basedir.__DS__.'locale'.__DS__.$locale.'.php')) { $l2 = array_from_file($basedir.__DS__.'locale'.__DS__.$locale.'.php', 'lang'); $lang = array_merge($lang,$l2); } return $lang; } /** * creates an help link */ public static function genHelpLink($topic, $text = '', $icon = true, $locale = NULL) { $baseurl = _BASEURL_ . '/data/manual/module/'; $basedir = _BASEPATH_ . '/data/manual/module/'; $topicurl = $baseurl . str_replace('.', '/', $topic); $topicdir = $basedir . str_replace('.', __DS__, $topic); if(is_null($locale)) $locale = System::getInstance()->getActiveLocale(); if(file_exists($topicdir . '-' . $locale . '.html')) $topicurl = $topicurl . '-' . $locale . '.html'; else $topicurl = $topicurl . '-en.html'; // default fallback if($icon === true) $icon = './layout/default/admin/images/actions/help.png'; $st = '' . ($icon ? ' ' : '') . $text . ''; return $st; } }