/** * Call controller action method * @return void */ public function callAction() { // Only call the method if the user is authenticated if ($this->checkAuthenticated()) { $this->view->assign('user', $this->user); parent::callAction(); } }
/** * Render view * @return void */ public function View() { // If the view is JSON if ($this->view instanceof \Sonic\View\JSON) { // Display view $response = $this->view->display(); } else { parent::View(); } }