/** * Display login form */ private function displayLoginForm() { if (!AuthController::isLoggedIn()) { $this->smarty->assign('LOGIN_ACTION_VALUE', AuthController::LOGIN_ACTION_VALUE); $this->render(AuthController::AUTH_LOGIN_KEY); } else { RequestManager::redirect(); } }
/** * @see AbstractController::run() */ public function run(Resource $resource) { $searchQuery = RequestManager::getParam(self::SEARCH_QUERY_PARAM); if (!empty($searchQuery)) { $results = $this->search($searchQuery); $this->setBean(array('query' => $searchQuery, 'resultSet' => $results)); $this->getView()->setViewName(self::MODULE_KEY)->display(); } else { RequestManager::redirect(); } }
/** * Terminate current request processing, And redirects to home page * * @param string $msg */ public static function exitRequest($msg) { Logger::getLogger()->logError('Exiting Request: ' . $msg); RequestManager::redirect(); }
/** * Log error in main log file and redirect to home page * * @param string $msg * @param string $type */ private function logErrorAndRedirect($msg, $type) { Logger::getLogger()->LogFatal($msg); RequestManager::redirect(); }