/** * 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'])); }); }
/** * 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)); }