public function initialize() { $this->_controller = 'Index'; $this->_action = 'index'; $this->_params = array(); $config = Registry::get('config'); $configData = $config->getArray(); $this->_multilang = $configData['m3_internationalization']['inter_multilang']; $this->_lang = $configData['m3_internationalization']['inter_default_lang']; }
public function redirect($path = '', $useBaseUrl = true, $permanent = false) { $fullPath = $path; $config = Registry::get('config'); $configData = $config->getArray(); if ($configData['m3_internationalization']['inter_multilang'] == true) { $fullPath = $configData['m3_internationalization']['inter_default_lang'] . '/' . $path; } if ($useBaseUrl == true) { $fullPath = $this->_request->getBaseUrl() . '/' . $fullPath; } if ($permanent == true) { header("HTTP/1.1 301 Moved Permanently"); } header('Location: ' . $fullPath); exit; }