IDs aller Unterseiten ermitteln


function getTreePids($parent = 0, $as_array = true){
$depth = 999999;
$queryGenerator = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( 'TYPO3\\CMS\\Core\\Database\\QueryGenerator' );
$childPids = $queryGenerator->getTreeList($parent, $depth, 0, 1); //Will be a string like 1,2,3
if($as_array) {
$childPids = explode(',',$childPids );
}
return $childPids;
}