public function initialize() { // check if the user is logged in $this->validateLogin(); // named application if (!defined('NAMED_APPLICATION')) { define('NAMED_APPLICATION', 'BackendAjax'); } // get values from the GET-parameters $module = isset($_GET['fork']['module']) ? $_GET['fork']['module'] : ''; $action = isset($_GET['fork']['action']) ? $_GET['fork']['action'] : ''; $language = isset($_GET['fork']['language']) ? $_GET['fork']['language'] : SITE_DEFAULT_LANGUAGE; // overrule the values with the ones provided through POST $module = isset($_POST['fork']['module']) ? $_POST['fork']['module'] : $module; $action = isset($_POST['fork']['action']) ? $_POST['fork']['action'] : $action; $language = isset($_POST['fork']['language']) ? $_POST['fork']['language'] : $language; try { // create URL instance, since the template modifiers need this object $URL = new Url($this->getKernel()); $URL->setModule($module); $this->setModule($module); $this->setAction($action); $this->setLanguage($language); // create a new action $this->ajaxAction = new AjaxAction($this->getKernel()); $this->ajaxAction->setModule($this->getModule()); $this->ajaxAction->setAction($this->getAction()); } catch (Exception $e) { $this->ajaxAction = new BackendBaseAJAXAction($this->getKernel()); $this->ajaxAction->output(BackendBaseAJAXAction::ERROR, null, $e->getMessage()); } }