<?php
$pid = $this->pObj->id;
$rootLine = \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($pid);
$ts = new \TYPO3\CMS\Core\TypoScript\TemplateService();
$ts->tt_track = false;
$ts->init();
$ts->start($rootLine);
var_dump($ts->setup);
?>