/** * 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); }
protected function generateTopicString(TopicInterface $topic) { return sprintf('%d-%s', $topic->getId(), $topic->getSlug()); }