/** * action list * * @return void */ public function listAction() { $posts = $this->postRepository->findAll(); $this->view->assign('posts', $posts); }
/** * action show * * @param \Dawin\PgBlog\Domain\Model\Category $category * @return void */ public function showAction(\Dawin\PgBlog\Domain\Model\Category $category) { $posts = $this->postRepository->findByCategory($category); $this->view->assignMultiple(array('category' => $category, 'posts' => $posts)); }
/** * action show * * @param \Dawin\PgBlog\Domain\Model\Tag $tag * @return void */ public function showAction(\Dawin\PgBlog\Domain\Model\Tag $tag) { $posts = $this->postRepository->findByTag($tag); $this->view->assignMultiple(array('tag' => $tag, 'posts' => $posts)); }