Esempio n. 1
0
 public function route($args)
 {
     parent::route($args);
     $id = $this->request->post('zineId');
     $success = $this->zineService->createZineIssue($id, $this->request->post());
     if ($success) {
         $this->app->redirect("/admin/zine/" . $id);
     }
 }
Esempio n. 2
0
 public function route($args)
 {
     parent::route($args);
     $msg = $this->userService->processLoginForm($this->request->post());
     if ($msg === false) {
         $this->app->flash('error', 'incorrect username or password');
     }
     $this->app->redirect("/admin");
 }
Esempio n. 3
0
 public function route($args)
 {
     parent::route($args);
     $result = $this->articleService->createArticle($this->request->post());
     if ($result === true) {
         $this->app->redirect("/admin/article");
     } else {
         $this->app->flash('error', 'Cannot create article');
         $this->app->flash('article', $result);
         $this->app->redirect("/admin/article");
     }
 }
Esempio n. 4
0
 public function route($args)
 {
     parent::route($args);
     $this->userService->processLogoutForm();
     $this->app->redirect($this->request->getRootUri());
 }