/** * Returns category's breadcrumbs * * @param \Shop\Service\CategoryEntity $category * @return array */ public function getBreadcrumbs(CategoryEntity $category) { $bm = new BreadcrumbMaker($this->categoryMapper, $this->webPageManager); return $bm->getBreadcrumbsById($category->getId()); }
/** * Returns product's breadcrumbs collection * * @param \Shop\Service\ProductEntity $product * @return array */ public function getBreadcrumbs(ProductEntity $product) { $bm = new BreadcrumbMaker($this->categoryMapper, $this->webPageManager); return $bm->getWithCategoryId($product->getCategoryId(), array(array('name' => $product->getName(), 'link' => '#'))); }