예제 #1
0
 /**
  * action list
  *
  * @return void
  */
 public function listAction()
 {
     $posts = $this->postRepository->findAll();
     $this->view->assign('posts', $posts);
 }
예제 #2
0
 /**
  * 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));
 }
예제 #3
0
 /**
  * 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));
 }