コード例 #1
0
ファイル: CategoryManager.php プロジェクト: bono-cms/Shop
 /**
  * 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());
 }
コード例 #2
0
ファイル: ProductManager.php プロジェクト: bono-cms/Shop
 /**
  * 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' => '#')));
 }