示例#1
0
 /**
  * @param int $cat
  */
 protected function addBreadcrumbStep($cat)
 {
     if ($cat !== 0 && $this->newsSettings['category_in_breadcrumb'] == 1) {
         if ($this->metaStatements instanceof MetaStatements) {
             $this->metaStatements->setCanonicalUri($this->router->route('news'));
         }
         $this->breadcrumb->append($this->translator->t('news', 'news'), 'news');
         $category = $this->categoryRepository->getTitleById($cat);
         if (!empty($category)) {
             $this->breadcrumb->append($category);
         }
     }
 }