/** * 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; }
/** * Adds the global Marker for the formtags to the given marker array * * @param array $markerArray Array of marker * @param string|bool $wrap If the marker should be wrapped * * @return array Marker Array with the new marker */ public function addFormMarker(array $markerArray, $wrap = FALSE) { $newMarkerArray['GENERAL_FORM_ACTION'] = $this->pi_getPageLink($this->conf['basketPid']); if (!empty($this->conf['basketPid.'])) { $basketConf = $this->conf['basketPid.']; $basketConf['returnLast'] = 'url'; $newMarkerArray['GENERAL_FORM_ACTION'] = $this->cObj->typoLink('', $basketConf); } if (is_object($this->category)) { $newMarkerArray['GENERAL_HIDDENCATUID'] = '<input type="hidden" name="' . $this->prefixId . '[catUid]" value="' . $this->category->getUid() . '" />'; } if ($wrap) { foreach ($newMarkerArray as $key => $value) { $markerArray[$this->cObj->wrap($key, $wrap)] = $value; } } else { $markerArray = array_merge($markerArray, $newMarkerArray); } return $markerArray; }