コード例 #1
0
ファイル: PostController.php プロジェクト: maguedon/pg_blog
 /**
  * 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
ファイル: TagController.php プロジェクト: maguedon/pg_blog
 /**
  * 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));
 }