public function addAction($acronym = null) { $form = new \Anax\HTMLForm\FormAddUser($this->users); $form->setDI($this->di); $form->check(); $this->di->theme->setTitle("Lägg till användare"); $this->di->views->add('default/page', ['title' => "Lägg till användare", 'content' => $form->getHTML(array('id' => 'adduser'))]); }
/** * Add new user. * * @param string $acronym of user to add. * * @return void */ public function addAction($acronym = null) { $form = new \Anax\HTMLForm\FormAddUser(); $form->setDI($this->di); $status = $form->check(); $this->di->theme->setTitle("Register"); $this->di->views->add('users/form', ['title' => "Register", 'content' => $form->getHTML()]); if ($status === true) { echo 'true'; $url = $this->url->create('list'); $form->response->redirect($url); } }