Пример #1
0
 protected function route($args)
 {
     $id = array_shift($args);
     $issueId = array_shift($args);
     $issue = $this->zineService->getZineIssue($id, $issueId);
     $this->app->render('admin/admin-zine-issue.html.twig', array('token' => $_SESSION['token'], 'stylesheets' => $this->getStyles(), 'type' => 'zine-issue', 'zineId' => $id, 'issue' => $issue));
 }
Пример #2
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);
     }
 }
Пример #3
0
 protected function route($args)
 {
     $id = array_shift($args);
     $zines = $this->zineService->getAll();
     $zine = $this->zineService->getZine($id);
     if ($zine) {
         $issues = $this->zineService->getIssuesForZine($id);
     } else {
         $issues = [];
     }
     $this->app->render('admin/admin-zine.html.twig', array('token' => $_SESSION['token'], 'stylesheets' => $this->getStyles(), 'type' => 'zine', 'zines' => $zines, 'zine' => $zine, 'issues' => $issues));
 }