Esempio n. 1
0
 /**
  * View a Topic
  *
  * @param    Courtyard\Forum\Entity\TopicInterface
  * @return   Courtyard\Forum\Templating\TemplateResponse
  */
 public function viewAction(TopicInterface $topic)
 {
     return new TemplateResponse(new TemplateReference('Topics', 'view'), array('topic' => $topic, 'board' => $topic->getBoard(), 'posts' => $this->postRepository->findByTopic($topic)), ForumEvents::VIEW_TOPIC);
 }
Esempio n. 2
0
 protected function generateTopicString(TopicInterface $topic)
 {
     return sprintf('%d-%s', $topic->getId(), $topic->getSlug());
 }