public static function getAccessibleCategoryIds() { $storeId = md5(__CLASS__ . '::AccessibleCategoryIds'); if (!isset(self::$cache[$storeId])) { $catIdArray = JUDirectoryFrontHelperCategory::getCategoryIdsRecursive(1); array_unshift($catIdArray, 1); self::$cache[$storeId] = $catIdArray; } return self::$cache[$storeId]; }
protected function getAllAssignedCatIds() { $cats_assignment = $this->params->get('categories_assignment', array()); $rootCatId = JUDirectoryFrontHelperCategory::getRootCategory()->id; $allAssignedCats = array(); if (count($cats_assignment)) { foreach ($cats_assignment as $cat_id) { $recursiveCatIds = JUDirectoryFrontHelperCategory::getCategoryIdsRecursive($cat_id); array_unshift($recursiveCatIds, $cat_id); $allAssignedCats = array_merge($allAssignedCats, $recursiveCatIds); } array_unshift($allAssignedCats, $rootCatId); } return $allAssignedCats; }