private function getCompleteTypoScriptSetup()
    {
        $pageUid = \Tx_Oelib_PageFinder::getInstance()->getPageUid();
        if ($pageUid === 0) {
            return [];
        }

        if ($this->existsFrontEnd()) {
            return $this->getFrontEndController()->tmpl->setup;
        }

        /** @var TemplateService $template */
        $template = GeneralUtility::makeInstance(TemplateService::class);
        $template->tt_track = 0;
        $template->init();

        /** @var PageRepository $page */
        $page = GeneralUtility::makeInstance(PageRepository::class);
        $rootline = $page->getRootLine($pageUid);
        $template->runThroughTemplates($rootline, 0);
        $template->generateConfig();

        return $template->setup;
    }