/** * Renders category block associated with provided web page id * * @param string $webPageId * @return string The block */ public function renderByAssocWebPageId($webPageId) { $categoryId = $this->itemMapper->fetchCategoryIdByWebPageId($webPageId); $class = $this->categoryMapper->fetchClassById($categoryId); return $this->renderByClass($class, $webPageId); }
/** * Fetches all published items associated with given category class * * @param string $class Category class * @return array */ public function fetchAllPublishedByCategoryClass($class) { // Get associated id $id = $this->categoryMapper->fetchIdByClass($class); return $this->fetchAllByCategoryId($id, true); }
/** * Fetches a category bag by its associated id * * @param string $id * @return array */ public function fetchById($id) { return $this->prepareResult($this->categoryMapper->fetchById($id)); }