示例#1
0
 /**
  * Gets all active categories from the rootline to change the ItemState
  *
  * @return array of all active Categories
  * @depricated since commerce 1.0.0, this function will be removed in commerce 1.4.0, method is no API and should be used
  */
 public function getActiveCats()
 {
     \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
     $active = array('0' => $this->catObj->getUid());
     $rootline = $this->catObj->getParentCategoriesUidlist();
     foreach ($rootline as $cat) {
         $active[] = $cat;
     }
     return $active;
 }
示例#2
0
 /**
  * Get category path
  *
  * @param Tx_Commerce_Domain_Model_Category $category Category
  *
  * @return string
  */
 public function getPathCat(Tx_Commerce_Domain_Model_Category $category)
 {
     $rootline = $category->getParentCategoriesUidlist();
     array_pop($rootline);
     $active = array_reverse($rootline);
     $this->mDepth = 0;
     $path = '';
     foreach ($active as $actCat) {
         if ($path === '') {
             $path = $actCat;
         } else {
             $path .= ',' . $actCat;
             $this->mDepth++;
         }
     }
     return $path;
 }