示例#1
0
 /**
  * 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
 public function generatePostUrl(PostInterface $post, $absolute = false)
 {
     return $this->generateTopicUrl($post->getTopic(), $absolute);
 }