コード例 #1
0
ファイル: TwigRouter.php プロジェクト: mobomaticRalf2/symlex
 protected function setTwigVariables($controller, $action, $isXmlHttpRequest)
 {
     parent::setTwigVariables($controller, $action, $isXmlHttpRequest);
     $this->twig->addGlobal('user_id', $this->session->getUserId());
     $this->twig->addGlobal('csrf_token', $this->session->getCsrfToken());
     $this->twig->addGlobal('firstname', $this->session->getUserFirstname());
     $this->twig->addGlobal('lastname', $this->session->getUserLastname());
     $this->twig->addGlobal('is_admin', $this->session->isAdmin());
     $this->twig->addGlobal('is_anonymous', $this->session->isAnonymous());
 }
コード例 #2
0
 public function testRoute()
 {
     $this->router->route();
 }