Exemplo n.º 1
0
 /**
  * @param $params
  * @param Application $app
  */
 public function viewLogout($params, Application $app)
 {
     $app->setTemplateData(array('title' => 'Logout'));
     $logout = false;
     if ($app->getSession()->get('is_authenticated')) {
         $logout = User::clearSession($app);
     }
     if ($logout) {
         $app->setTemplateData(array('content_message' => 'The user successfully logged out.'));
     }
     $this->display($app, 'frm_login.twig');
 }
Exemplo n.º 2
0
 /**
  * @param Application $app
  * @param $template
  */
 public function display(Application $app, $template)
 {
     $this->response = new Response($app->getTemplateManager()->getTemplate()->render($app->getConfManager()->getPathUserTemplate() . '/' . $template, $app->getTemplateData()), Response::HTTP_OK, array('content-type' => 'text/html'));
     $this->response->send();
 }