views/AbstractView.php
/**
     * Method for executing all the pre-display activities
     */
Method for executing all the pre-display activities
Method for executing all the pre - display activities
private function prepareDisplay() {
        $searchSuggestions = Session::get(Session::SESS_SEARCH_SUGGESTIONS);
        if (empty($searchSuggestions)) {
            $search = new SearchController();
            $searchSuggestions = $search->getSearchSuggestions();
            Session::set(Session::SESS_SEARCH_SUGGESTIONS, $searchSuggestions);
        }
        $this->smarty->assign('APP_NAME', Constants::APP_NAME);
        $this->smarty->assign('APP_LOGO', Constants::APP_LOGO);
        $this->smarty->assign('APP_VERSION', Constants::APP_VERSION);
        $this->smarty->assign('CSRF_TOKEN_NAME', Constants::CSRF_TOKEN_NAME);
        $this->smarty->assign('CSRF_TOKEN_VALUE', RequestManager::getCsrfToken());
        $this->smarty->assign('SEARCH_SUGGESTIONS', $searchSuggestions);
        $this->smarty->assign('CHPWD_ACTION_VALUE', AuthController::CHPWD_ACTION_VALUE);
    }
private function prepareDisplay ( ) { $ searchSuggestions = Session :: get ( Session :: SESS_SEARCH_SUGGESTIONS ) ; if ( empty ( $ searchSuggestions ) ) { $ search = new SearchController ( ) ; $ searchSuggestions = $ search -> getSearchSuggestions ( ) ; Session :: set ( Session :: SESS_SEARCH_SUGGESTIONS , $ searchSuggestions ) ; } $ this -> smarty -> assign ( 'APP_NAME' , Constants :: APP_NAME ) ; $ this -> smarty -> assign ( 'APP_LOGO' , Constants :: APP_LOGO ) ; $ this -> smarty -> assign ( 'APP_VERSION' , Constants :: APP_VERSION ) ; $ this -> smarty -> assign ( 'CSRF_TOKEN_NAME' , Constants :: CSRF_TOKEN_NAME ) ; $ this -> smarty -> assign ( 'CSRF_TOKEN_VALUE' , RequestManager :: getCsrfToken ( ) ) ; $ this -> smarty -> assign ( 'SEARCH_SUGGESTIONS' , $ searchSuggestions ) ; $ this -> smarty -> assign ( 'CHPWD_ACTION_VALUE' , AuthController :: CHPWD_ACTION_VALUE ) ; }
Method for executing all the pre-display activities
Method for executing all the pre - display activities