Exemplo n.º 1
0
 protected function createForTopic(\Symbb\Core\ForumBundle\Entity\Topic $object, $breadcrumb)
 {
     if ($object->getId() > 0) {
         $uri = $this->router->generate('symbb_forum_topic_show', array('id' => $object->getId(), 'name' => $object->getSeoName(), 'page' => 1));
         $breadcrumb[] = array('name' => $object->getName(), 'link' => $uri);
     }
     $forum = $object->getForum();
     $breadcrumb = $this->createForForum($forum, $breadcrumb);
     return $breadcrumb;
 }
Exemplo n.º 2
0
 public function getBreadcrumbData(\Symbb\Core\ForumBundle\Entity\Topic $object, ForumManager $forumManager)
 {
     $breadcrumb = array();
     $forum = $object->getForum();
     if (\is_object($forum) && $forum->getId() > 0) {
         $breadcrumb = $forumManager->getBreadcrumbData($forum);
         $breadcrumb[] = array('type' => 'topic', 'name' => $object->getName(), 'seoName' => $object->getSeoName(), 'id' => $object->getId());
     }
     return $breadcrumb;
 }