コード例 #1
0
ファイル: SiteService.php プロジェクト: bono-cms/Menu
 /**
  * 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);
 }
コード例 #2
0
ファイル: ItemManager.php プロジェクト: bono-cms/Menu
 /**
  * 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);
 }
コード例 #3
0
ファイル: CategoryManager.php プロジェクト: bono-cms/Menu
 /**
  * Fetches a category bag by its associated id
  * 
  * @param string $id
  * @return array
  */
 public function fetchById($id)
 {
     return $this->prepareResult($this->categoryMapper->fetchById($id));
 }