コード例 #1
0
ファイル: PostsController.php プロジェクト: courtyard/forum
 /**
  * View a specific post
  * 
  * @param    Courtyard\Forum\Entity\PostInterface
  * @return   Courtyard\Forum\Templating\TemplateResponse
  */
 public function viewAction(PostInterface $post)
 {
     return new TemplateResponse(new TemplateReference('Topics', 'list'), array('board' => $board = $post->getTopic()->getBoard(), 'topics' => $this->topicRepository->findLatestIn($board)), ForumEvents::VIEW_POST);
 }
コード例 #2
0
ファイル: ForumUrlGenerator.php プロジェクト: courtyard/forum
 public function generatePostUrl(PostInterface $post, $absolute = false)
 {
     return $this->generateTopicUrl($post->getTopic(), $absolute);
 }