Example #1
0
 /**
  * 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);
 }
Example #2
0
 /**
  * Returns a tree builder loaded with provided menu class
  * 
  * @param string $class Menu category's class
  * @return \Krystal\Tree\AdjacencyList\TreeBuilder
  */
 private function createTreeBuilder($class)
 {
     $id = $this->categoryMapper->fetchIdByClass($class);
     $data = $this->itemMapper->fetchAllByCategoryId($id, true);
     return new TreeBuilder($data);
 }