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)); }
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); } }
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)); }