Feature #33138
closedprovide getPidList function in ExtBase environment (includes propsed solution)
0%
Description
The storagePid works great, but there are some other cases you need a list of pids and that function is not available for extbase, because it's within tslib_piBase. We have a version that you can use within your controller.
Where should such a function be places? Is there some core lib instead of tslib_piBase?
getPidList($pid_list, $recursive = 0) { if (!strcmp($pid_list, '')) { $pid_list = $GLOBALS['TSFE']->id; } $recursive = t3lib_div::intInRange($recursive, 0); $pid_list_arr = array_unique(t3lib_div::trimExplode(',', $pid_list, 1)); $pid_list = array(); $tree = t3lib_div::makeInstance('t3lib_queryGenerator'); foreach($pid_list_arr as $val) { $val = t3lib_div::intInRange($val, 0); if ($val) { $_list = $tree->getTreeList(-1 * $val, $recursive); if ($_list) { $pid_list[] = $_list; } } } return implode(',', $pid_list); }
Updated by Alexander Schnitzler about 12 years ago
- Category set to Extbase: Utility
To be discussed.
Updated by Alexander Schnitzler over 11 years ago
- Target version set to Extbase 6.2
Updated by Anja Leichsenring over 11 years ago
- Target version changed from Extbase 6.2 to Extbase 6.3
Updated by Alexander Opitz about 10 years ago
- Status changed from New to Needs Feedback
Hi,
was this issue fixed or does it still exists?
Updated by Jonas Felix about 10 years ago
I don't think there is a function within the ExtBase Scope.
But of course the function is still needed. It's only that everybody does his own version in his/her extension.
Updated by Alexander Opitz almost 10 years ago
- Project changed from 534 to TYPO3 Core
- Category changed from Extbase: Utility to Extbase
- Status changed from Needs Feedback to New
- Target version changed from Extbase 6.3 to 7.0
Updated by Mathias Schreiber almost 10 years ago
- Target version changed from 7.0 to 7.1 (Cleanup)
Updated by Benni Mack over 9 years ago
- Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Benni Mack about 9 years ago
- Target version changed from 7.5 to 8 LTS
Updated by Riccardo De Contardi over 7 years ago
- Target version changed from 8 LTS to 9.0
Updated by Susanne Moog over 4 years ago
- Status changed from New to Closed
Nowadays the method doesn't provide much convenience, for queries you'd rather have an array and there are few cases where you'd need to fetch multiple trees at ones. For fetching the pids of a single tree there is cObj->getTreeList already.
Closing this issue now.