Skip to content

Instantly share code, notes, and snippets.

@BlackhawkG7
Last active November 2, 2023 14:52
Show Gist options
  • Save BlackhawkG7/4c8e014b87bd9c7a1d99e09fb6bb2203 to your computer and use it in GitHub Desktop.
Save BlackhawkG7/4c8e014b87bd9c7a1d99e09fb6bb2203 to your computer and use it in GitHub Desktop.
Get 10 levels of the tree recursively starting at $pid | TYPO3 // extbase
// get 10 levels of the tree recursively starting at $pid
$pid = intVal($_GET['id']);
$queryGenerator = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\QueryGenerator');
$pidList = $queryGenerator->getTreeList($pid, 10, 0, 1);
$pids = explode(',',$pidList);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment