예제 #1
0
 /**
  * Gets all breadcrumbs by associated id
  * 
  * @param string $id Category id
  * @return array
  */
 public function getBreadcrumbsById($id)
 {
     $wm = $this->webPageManager;
     $builder = new BreadcrumbBuilder($this->categoryMapper->fetchBcData(), $id);
     return $builder->makeAll(function ($breadcrumb) use($wm) {
         return array('name' => $breadcrumb['name'], 'link' => $wm->getUrl($breadcrumb['web_page_id'], $breadcrumb['lang_id']));
     });
 }
예제 #2
0
 /**
  * Fetches category's entity by its associated id
  * 
  * @param string $id Category id
  * @return \Shop\Service\CategoryEntity|boolean
  */
 public function fetchById($id)
 {
     return $this->prepareResult($this->categoryMapper->fetchById($id));
 }