Пример #1
0
 /**
  * Add new tags.
  *
  * @param string $tag of user to add.
  *
  * @return void
  */
 public function addAction()
 {
     $this->di->session();
     $form = new \Anax\HTMLForm\CFormTagAdd();
     $form->setDI($this->di);
     $form->check();
     $this->di->theme->setTitle("Ny Tag");
     $this->di->views->add('default/page', ['title' => "Ny Tag", 'content' => $form->getHTML()]);
 }
Пример #2
0
 /**
  * Add tag
  *
  */
 public function addAction()
 {
     $form = new \Anax\HTMLForm\CFormTagAdd();
     $form->setDI($this->di);
     $status = $form->check();
     if ($this->session->has('user')) {
         $this->theme->setTitle('Lägg till en tagg');
         $this->views->add('tags/form', ['title' => 'Lägg till en tagg', 'content' => $form->getHTML()], 'main');
     } else {
         $url = $this->url->create('login');
         $this->response->redirect($url);
     }
 }