Example #1
0
 /**
  * Finds the category in the pathway
  *
  * @param Category $category
  * @return stdClass menu item
  * @since 2.0
  */
 protected function _findInCategoryPath($category)
 {
     foreach ($category->getPathway() as $id => $cat) {
         if ($menu_item = $this->_find('category', $id)) {
             return $menu_item;
         }
     }
 }
Example #2
0
 /**
  * Get the category pathway
  *
  * @return array The pathway to this category
  *
  * @since 2.0
  */
 public function getPathway()
 {
     if ($this->_parent == null) {
         return array();
     }
     $pathway = $this->_parent->getPathway();
     $pathway[$this->id] = $this;
     return $pathway;
 }