16 use Psr\Http\Message\ResponseInterface;
17 use Psr\Http\Message\ServerRequestInterface;
44 $pageId = (int)($request->getParsedBody()[
'pageId'] ?? $request->getQueryParams()[
'pageId']);
62 $tsParser = GeneralUtility::makeInstance(ExtendedTemplateService::class);
64 $rootLine = GeneralUtility::makeInstance(RootlineUtility::class, $pageId)->get();
66 $tsParser->runThroughTemplates($rootLine);
69 array_pop($tsParser->config);
70 array_pop($tsParser->constants);
71 $tsParser->linkObjects =
true;
72 $tsParser->ext_regLinenumbers =
false;
73 $tsParser->generateConfig();
87 $cleanedTreeBranch = [];
88 foreach ($treeBranch as $key => $value) {
90 if (substr($key, -1) !==
'.') {
92 if (mb_strlen($value) > 20) {
93 $value = mb_substr($value, 0, 20);
95 if (!isset($cleanedTreeBranch[$key])) {
96 $cleanedTreeBranch[$key] = [];
98 $cleanedTreeBranch[$key][
'v'] = $value;
104 if (substr($key, -1) ===
'.') {
105 $key = rtrim($key,
'.');
107 if (!isset($cleanedTreeBranch[$key])) {
108 $cleanedTreeBranch[$key] = [];
110 $cleanedTreeBranch[$key][
'c'] = $subBranch;
114 return $cleanedTreeBranch;