‪TYPO3CMS  ‪main
TreeFromLineStreamBuilder.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
41 
58 {
60  private string ‪$type;
62 
70  private array ‪$atImportTypeToSuffixMap = [
71  'constants' => ['typoscript'],
72  'setup' => ['typoscript'],
73  'other' => ['typoscript'],
74  'tsconfig' => ['typoscript', 'tsconfig'],
75  ];
76 
77  public function ‪__construct(
78  private readonly ‪FileNameValidator $fileNameValidator,
79  ) {}
80 
82  {
83  if (!in_array(‪$type, ['constants', 'setup', 'tsconfig', 'other'], true)) {
84  // Type "constants" and "setup" trigger the weird addStaticMagicFromGlobals() resolving, while "other" ignores it.
85  throw new \RuntimeException('type must be either "constants", "setup", "tsconfig" or "other"', 1652741356);
86  }
87  $this->type = ‪$type;
88  $this->tokenizer = ‪$tokenizer;
89  $this->‪buildTreeInternal($node);
90  }
91 
114  private function ‪buildTreeInternal(‪IncludeInterface $node): void
115  {
116  $parentNode = $node;
117  $givenTokenLineStream = $node->‪getLineStream();
118  $lineStream = new ‪LineStream();
119  $childNode = new ‪SegmentInclude();
120  $childNode->setName($node->‪getName());
121  $childNode->setPath($node->‪getPath());
122 
123  foreach ($givenTokenLineStream->getNextLine() as $line) {
124  if ($line instanceof ‪ConditionLine && $node instanceof ‪ConditionInclude) {
125  // Finish current condition when this line is another condition
126  $node->‪setSplit();
127  if (!$lineStream->isEmpty()) {
128  $childNode->setLineStream($lineStream);
129  $node->‪addChild($childNode);
130  $lineStream = new ‪LineStream();
131  }
132  $node = $parentNode;
133  }
134 
135  if ($line instanceof ‪ConditionLine) {
136  // A new condition not yet in condition context
137  $node->‪setSplit();
138  $conditionValueToken = $line->getTokenValue();
139  if (!$lineStream->isEmpty()) {
140  $childNode->setLineStream($lineStream);
141  $node->‪addChild($childNode);
142  $lineStream = new ‪LineStream();
143  }
144  $childNode = new ‪ConditionInclude();
145  $childNode->setSplit();
146  $childNode->setName($node->‪getName());
147  $childNode->setPath($node->‪getPath());
148  $childNode->setConditionToken($conditionValueToken);
149  $lineStream->append($line);
150  $childNode->setLineStream($lineStream);
151  $node->‪addChild($childNode);
152  $parentNode = $node;
153  $node = $childNode;
154  $childNode = new ‪SegmentInclude();
155  $childNode->setName($node->‪getName());
156  $childNode->setPath($node->‪getPath());
157  $lineStream = new ‪LineStream();
158  continue;
159  }
160 
161  if (($node instanceof ‪ConditionInclude || $node instanceof ‪ConditionElseInclude)
162  && $line instanceof ‪ConditionStopLine
163  ) {
164  // Finish condition segment due to [end] or [global] line
165  $node->‪setSplit();
166  $lineStream->append($line);
167  $childNode->setLineStream($lineStream);
168  $node->‪addChild($childNode);
169  $node = $parentNode;
170  $childNode = new ‪SegmentInclude();
171  $childNode->setName($node->‪getName());
172  $childNode->setPath($node->‪getPath());
173  $lineStream = new ‪LineStream();
174  continue;
175  }
176 
177  if ($node instanceof ‪ConditionInclude && $line instanceof ‪ConditionElseLine) {
178  // Active condition into [else] condition
179  $node->‪setSplit();
180  if (!$lineStream->isEmpty()) {
181  $childNode->setLineStream($lineStream);
182  $node->‪addChild($childNode);
183  }
184  $conditionToken = $node->getConditionToken();
185  $node = $parentNode;
186  $childNode = new ‪ConditionElseInclude();
187  $childNode->setSplit();
188  $childNode->setName($node->‪getName());
189  $childNode->setPath($node->‪getPath());
190  $childNode->setConditionToken($conditionToken);
191  $lineStream = new ‪LineStream();
192  $lineStream->append($line);
193  $childNode->setLineStream($lineStream);
194  $node->‪addChild($childNode);
195  $parentNode = $node;
196  $node = $childNode;
197  $childNode = new ‪SegmentInclude();
198  $childNode->setName($node->‪getName());
199  $childNode->setPath($node->‪getPath());
200  $lineStream = new ‪LineStream();
201  continue;
202  }
203 
204  if ($line instanceof ‪ImportLine) {
205  $node->‪setSplit();
206  $atImportValueToken = $line->getValueToken();
207  if (!$lineStream->isEmpty()) {
208  $childNode->setLineStream($lineStream);
209  $node->‪addChild($childNode);
210  $lineStream = new ‪LineStream();
211  }
212  $childNode = new ‪SegmentInclude();
213  $childNode->setName($node->‪getName());
214  $childNode->setPath($node->‪getPath());
215  $allowedSuffixes = $this->atImportTypeToSuffixMap[‪$this->type];
216  foreach ($allowedSuffixes as $allowedSuffix) {
217  $this->‪processAtImport($allowedSuffix, $node, $atImportValueToken, $line);
218  }
219  continue;
220  }
221 
222  if ($line instanceof ‪ImportOldLine) {
223  $node->‪setSplit();
224  $includeTypoScriptValueToken = $line->getValueToken();
225  if (!$lineStream->isEmpty()) {
226  $childNode->setLineStream($lineStream);
227  $node->‪addChild($childNode);
228  $lineStream = new ‪LineStream();
229  }
230  $childNode = new ‪SegmentInclude();
231  $childNode->setName($node->‪getName());
232  $childNode->setPath($node->‪getPath());
233  $this->‪processIncludeTyposcript($node, $includeTypoScriptValueToken, $line);
234  continue;
235  }
236 
237  $lineStream->append($line);
238  }
239 
240  if ($node->‪isSplit() && !$lineStream->isEmpty()) {
241  $childNode->setLineStream($lineStream);
242  $node->‪addChild($childNode);
243  }
244  }
245 
251  private function ‪processAtImport(string $fileSuffix, ‪IncludeInterface $node, ‪Token $atImportValueToken, ‪LineInterface $atImportLine, bool $tryRelative = false): void
252  {
253  $atImportValue = $atImportValueToken->‪getValue();
254  if ($tryRelative) {
255  if (empty($node->‪getPath())) {
256  return;
257  }
258  $parentPath = rtrim(dirname($node->‪getPath()), '/') . '/';
259  $atImportValue = ltrim($atImportValue, './');
260  $atImportValue = $parentPath . $atImportValue;
261  }
262  $absoluteFileName = rtrim(GeneralUtility::getFileAbsFileName($atImportValue), '/');
263  if ($absoluteFileName === '') {
264  return;
265  }
266  if (str_ends_with($absoluteFileName, '.' . $fileSuffix) && is_file($absoluteFileName)) {
267  // Simple file with allowed file suffix
268  if ($this->fileNameValidator->isValid($absoluteFileName)) {
269  $this->‪addSingleAtImportFile($node, $absoluteFileName, $atImportValue, $atImportLine);
270  $this->‪addStaticMagicFromGlobals($node, $atImportValue);
271  }
272  } elseif (is_dir($absoluteFileName)) {
273  // Directories with and without ending /
274  $filesAndDirs = scandir($absoluteFileName);
275  foreach ($filesAndDirs as $potentialInclude) {
276  if (!str_ends_with($potentialInclude, '.' . $fileSuffix)
277  || is_dir($absoluteFileName . '/' . $potentialInclude)
278  || !$this->fileNameValidator->isValid($absoluteFileName . '/' . $potentialInclude)
279  ) {
280  continue;
281  }
282  $singleAbsoluteFileName = $absoluteFileName . '/' . $potentialInclude;
283  ‪$identifier = rtrim($atImportValue, '/') . '/' . $potentialInclude;
284  $this->‪addSingleAtImportFile($node, $singleAbsoluteFileName, ‪$identifier, $atImportLine);
286  }
287  } elseif (is_file($absoluteFileName . '.' . $fileSuffix)) {
288  // File without .typoscript / .tsconfig suffix, but exists when suffix is added
289  if ($this->fileNameValidator->isValid($absoluteFileName . '.' . $fileSuffix)) {
290  $singleAbsoluteFileName = $absoluteFileName . '.' . $fileSuffix;
291  ‪$identifier = $atImportValue . '.' . $fileSuffix;
292  $this->‪addSingleAtImportFile($node, $singleAbsoluteFileName, ‪$identifier, $atImportLine);
294  }
295  } elseif (str_contains($absoluteFileName, '*')) {
296  // Something with *
297  $directory = rtrim(dirname($absoluteFileName) . '/');
298  $directoryExists = is_dir($directory);
299  if (!$directoryExists && str_starts_with($atImportValue, './') && !$tryRelative) {
300  // See if we can import some relative wildcard like "./Setup/*" or "./Setup/*.typoscript"
301  $this->‪processAtImport($fileSuffix, $node, $atImportValueToken, $atImportLine, true);
302  return;
303  }
304  if (!$directoryExists) {
305  // Absolute directory. There is nothing to import if the directory does not exist.
306  return;
307  }
308  $filePattern = basename($absoluteFileName);
309  if (!str_contains($filePattern, '*')) {
310  // The * wildcard must occur in the filename, wildcards in directories are not handled.
311  return;
312  }
313  if (mb_substr_count($filePattern, '*') > 1) {
314  // Only one wildcard character is allowed, foo*.bar*.typoscript is considered an invalid pattern.
315  return;
316  }
317  // Normalize right side, making sure it always ends with $fileSuffix ".typoscript" / ".tsconfig"
318  if (str_ends_with($filePattern, $fileSuffix)) {
319  $filePattern = mb_substr($filePattern, 0, -1 * strlen($fileSuffix));
320  $filePattern = rtrim($filePattern, '.');
321  }
322  $filePattern = $filePattern . '.' . $fileSuffix;
323  $wildcardPosition = mb_strpos($filePattern, '*');
324  $leftPrefix = mb_substr($filePattern, 0, $wildcardPosition);
325  $rightPrefix = mb_substr($filePattern, $wildcardPosition + 1);
326  $filesAndDirs = scandir($directory);
327  foreach ($filesAndDirs as $potentialInclude) {
328  if ($potentialInclude === '.'
329  || $potentialInclude === '..'
330  || !str_starts_with($potentialInclude, $leftPrefix)
331  || !str_ends_with($potentialInclude, $rightPrefix)
332  || is_dir($directory . $potentialInclude)
333  || !$this->fileNameValidator->isValid($directory . $potentialInclude)
334  ) {
335  continue;
336  }
337  $singleAbsoluteFileName = $directory . $potentialInclude;
338  ‪$identifier = rtrim(dirname($atImportValue), '/') . '/' . $potentialInclude;
339  $this->‪addSingleAtImportFile($node, $singleAbsoluteFileName, ‪$identifier, $atImportLine);
341  }
342  } elseif (!$tryRelative) {
343  // See if we can import relative "./foo.typoscript" or "foo.typoscript"
344  $this->‪processAtImport($fileSuffix, $node, $atImportValueToken, $atImportLine, true);
345  }
346  }
347 
353  private function ‪addSingleAtImportFile(‪IncludeInterface $parentNode, string $absoluteFileName, string $path, ‪LineInterface $atImportLine): void
354  {
355  $content = file_get_contents($absoluteFileName);
356  $newNode = new ‪AtImportInclude();
357  $newNode->setName($path);
358  $newNode->setPath($path);
359  $newNode->setLineStream($this->tokenizer->tokenize($content));
360  $newNode->setOriginalLine($atImportLine);
361  $this->‪buildTreeInternal($newNode);
362  $parentNode->‪addChild($newNode);
363  }
364 
365  private function ‪processIncludeTyposcript(‪IncludeInterface $node, ‪Token $includeTyposcriptValueToken, ‪LineInterface $importKeywordOldLine): void
366  {
367  $fullString = $includeTyposcriptValueToken->‪getValue();
368  $potentialSourceArray = preg_split('#.*(source="[^"]*").*|>#', $fullString, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
369  $source = '';
370  foreach ($potentialSourceArray as $candidate) {
371  $candidate = trim($candidate);
372  if (str_starts_with($candidate, 'source="')) {
373  $source = rtrim(substr($candidate, 8), '"');
374  $source = str_replace([' ', "\t"], '', $source);
375  break;
376  }
377  }
378  if (empty($source)) {
379  // No 'source="..."'
380  return;
381  }
382  $potentialConditionArray = preg_split('#.*(condition="(?:\\\\\\\\|\\\\"|[^\"])*").*|>#', $fullString, 2, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
383  $condition = '';
384  foreach ($potentialConditionArray as $candidate) {
385  $candidate = trim($candidate);
386  if (str_starts_with($candidate, 'condition="')) {
387  $candidate = trim(substr($candidate, 10), '"');
388  if (str_starts_with($candidate, '[') && str_ends_with($candidate, ']')) {
389  // Cut off '[' and ']' if exist.
390  $candidate = mb_substr($candidate, 1, -1);
391  }
392  $condition = stripslashes($candidate);
393  break;
394  }
395  }
396  $potentialExtensionsArray = preg_split('#.*(extensions*="[^"]*").*|>#', $fullString, 2, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
397  $extensions = [];
398  foreach ($potentialExtensionsArray as $candidate) {
399  $candidate = trim($candidate);
400  if (str_starts_with($candidate, 'extensions="')) {
401  $extensions = GeneralUtility::trimExplode(',', rtrim(substr($candidate, 12), '"'), true);
402  break;
403  }
404  }
405 
406  if (str_starts_with($source, 'FILE:./')) {
407  // Single relative file include
408  $fileName = dirname($node->‪getPath()) . '/' . substr($source, 7);
409  $absoluteFileName = rtrim(GeneralUtility::getFileAbsFileName($fileName), '/');
410  if ($absoluteFileName === '') {
411  return;
412  }
413  if ($this->fileNameValidator->isValid($absoluteFileName) && is_file($absoluteFileName)) {
414  $nodeToAddTo = $this->‪processConditionalIncludeTyposcript($node, $condition, $fileName);
415  $this->‪addSingleIncludeTyposcriptFile($nodeToAddTo, $absoluteFileName, $fileName, $importKeywordOldLine);
416  }
417  } elseif (str_starts_with($source, 'FILE:')) {
418  // Single file include, either prefixed with EXT:, or relative to public dir
419  // Throw away FILE:, then resolve EXT: or public dir relative
420  $fileName = substr($source, 5);
421  $absoluteFileName = rtrim(GeneralUtility::getFileAbsFileName($fileName), '/');
422  if ($absoluteFileName === '') {
423  return;
424  }
425  if ($this->fileNameValidator->isValid($absoluteFileName) && is_file($absoluteFileName)) {
426  $nodeToAddTo = $this->‪processConditionalIncludeTyposcript($node, $condition, $fileName);
427  $this->‪addSingleIncludeTyposcriptFile($nodeToAddTo, $absoluteFileName, $fileName, $importKeywordOldLine);
428  $this->‪addStaticMagicFromGlobals($nodeToAddTo, $fileName);
429  }
430  } elseif (str_starts_with($source, 'DIR:')) {
431  // Single file include, either prefixed with EXT:, or relative to public dir
432  // Throw away FILE:, then resolve EXT: or public dir relative
433  $dirName = substr($source, 4);
434  $absoluteDirName = rtrim(GeneralUtility::getFileAbsFileName($dirName), '/');
435  if ($absoluteDirName === '' || !is_dir($absoluteDirName)) {
436  return;
437  }
438  $nodeToAddTo = $this->‪processConditionalIncludeTyposcript($node, $condition, $dirName);
439  $this->‪importIncludeTyposcriptDirectoryRecursive($nodeToAddTo, $importKeywordOldLine, $dirName, $absoluteDirName, $extensions);
440  }
441  }
442 
449  private function ‪processConditionalIncludeTyposcript(‪IncludeInterface $parentNode, ?string $condition, string $fileName): ‪IncludeInterface
450  {
451  $nodeToAddTo = $parentNode;
452  if ($condition) {
453  $conditionNode = new ‪ConditionIncludeTyposcriptInclude();
454  $conditionNode->setName($fileName);
455  $conditionNode->setConditionToken(new ‪Token(TokenType::T_VALUE, $condition, 0, 0));
456  $conditionNode->setSplit();
457  $nodeToAddTo->addChild($conditionNode);
458  $nodeToAddTo = $conditionNode;
459  }
460  return $nodeToAddTo;
461  }
462 
464  ‪IncludeInterface $nodeToAddTo,
465  ‪LineInterface $importKeywordOldLine,
466  string $dirName,
467  string $absoluteDirName,
468  array $extensions
469  ): void {
470  $filesAndDirs = scandir($absoluteDirName);
471  $subDirs = [];
472  foreach ($filesAndDirs as $potentialInclude) {
473  // Handle files in this dir and remember possible sub-dirs
474  if ($potentialInclude === '.' || $potentialInclude === '..') {
475  continue;
476  }
477  if (is_dir($absoluteDirName . '/' . $potentialInclude)) {
478  $subDirs[] = $potentialInclude;
479  continue;
480  }
481  if (!$this->fileNameValidator->isValid($absoluteDirName . '/' . $potentialInclude)) {
482  continue;
483  }
484  if (!empty($extensions)) {
485  // Check if file is allowed by allowed 'extensions' setting if given
486  $fileIsAllowed = false;
487  foreach ($extensions as $extension) {
488  if (str_ends_with($potentialInclude, $extension)) {
489  $fileIsAllowed = true;
490  break;
491  }
492  }
493  if (!$fileIsAllowed) {
494  continue;
495  }
496  }
497  ‪$identifier = rtrim($dirName, '/') . '/' . $potentialInclude;
498  $absoluteFileName = $absoluteDirName . '/' . $potentialInclude;
499  $this->‪addSingleIncludeTyposcriptFile($nodeToAddTo, $absoluteFileName, ‪$identifier, $importKeywordOldLine);
500  }
501  foreach ($subDirs as $subDir) {
503  $nodeToAddTo,
504  $importKeywordOldLine,
505  $dirName . '/' . $subDir,
506  $absoluteDirName . '/' . $subDir,
507  $extensions
508  );
509  }
510  }
511 
517  private function ‪addSingleIncludeTyposcriptFile(‪IncludeInterface $parentNode, string $absoluteFileName, string $path, ‪LineInterface $importKeywordOldLine): void
518  {
519  $content = file_get_contents($absoluteFileName);
520  $newNode = new ‪IncludeTyposcriptInclude();
521  $newNode->setName($path);
522  $newNode->setPath($path);
523  $newNode->setLineStream($this->tokenizer->tokenize($content));
524  $newNode->setOriginalLine($importKeywordOldLine);
525  $this->‪buildTreeInternal($newNode);
526  $parentNode->‪addChild($newNode);
527  }
528 
534  private function ‪addStaticMagicFromGlobals(‪IncludeInterface $parentNode, string $path): void
535  {
536  if (!in_array($this->type, ['constants', 'setup'], true) || !str_starts_with($path, 'EXT:')) {
537  // This magic method is relevant for Frontend TypoScript only, indicated by
538  // $this->type being either "constants" or "setup".
539  return;
540  }
541  $includeStaticFileWithoutExt = substr($path, 4);
542  $includeStaticFileExtKeyAndPath = GeneralUtility::trimExplode('/', $includeStaticFileWithoutExt, true, 2);
543  $extensionKey = $includeStaticFileExtKeyAndPath[0];
544  $extensionKeyWithoutUnderscores = str_replace('_', '', $extensionKey);
545  if (!$extensionKeyWithoutUnderscores || !‪ExtensionManagementUtility::isLoaded($extensionKey)) {
546  return;
547  }
548  // example: 'Configuration/TypoScript/MyStaticInclude/'
549  $pathSegmentWithAppendedSlash = rtrim(dirname($includeStaticFileExtKeyAndPath[1])) . '/';
550  $file = basename($path);
551  ‪$type = GeneralUtility::trimExplode('.', $file, false, 2)[0] ?? '';
552  if (‪$type !== $this->type) {
553  return;
554  }
555  $globalsLookup = $extensionKeyWithoutUnderscores . '/' . $pathSegmentWithAppendedSlash;
556  // If this is a template of type "default content rendering", see if other extensions have added their TypoScript that should be included.
557  if (in_array($globalsLookup, ‪$GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'], true)) {
558  $source = ‪$GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_' . ‪$type . '.']['defaultContentRendering'] ?? null;
559  if (!empty($source)) {
561  $node->setName('TYPO3_CONF_VARS defaultContentRendering for ' . $path);
562  $node->setLineStream($this->tokenizer->tokenize($source));
563  $this->‪buildTreeInternal($node);
564  $parentNode->‪addChild($node);
565  }
566  }
567  }
568 }
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\$tokenizer
‪TokenizerInterface $tokenizer
Definition: TreeFromLineStreamBuilder.php:61
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Line\LineInterface
Definition: LineInterface.php:32
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Line\ConditionElseLine
Definition: ConditionElseLine.php:25
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface\getName
‪getName()
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\processIncludeTyposcript
‪processIncludeTyposcript(IncludeInterface $node, Token $includeTyposcriptValueToken, LineInterface $importKeywordOldLine)
Definition: TreeFromLineStreamBuilder.php:365
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\$type
‪string $type
Definition: TreeFromLineStreamBuilder.php:60
‪TYPO3\CMS\Core\TypoScript\IncludeTree
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Token\Token
Definition: Token.php:29
‪TYPO3\CMS\Core\Resource\Security\FileNameValidator
Definition: FileNameValidator.php:25
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\SegmentInclude
Definition: SegmentInclude.php:32
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface\getPath
‪getPath()
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Token\TokenType
‪TokenType
Definition: TokenType.php:26
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Line\ImportLine
Definition: ImportLine.php:33
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface\addChild
‪addChild(IncludeInterface $node)
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Line\ImportOldLine
Definition: ImportOldLine.php:32
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Line\ConditionStopLine
Definition: ConditionStopLine.php:26
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\$atImportTypeToSuffixMap
‪array $atImportTypeToSuffixMap
Definition: TreeFromLineStreamBuilder.php:70
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder
Definition: TreeFromLineStreamBuilder.php:58
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\__construct
‪__construct(private readonly FileNameValidator $fileNameValidator,)
Definition: TreeFromLineStreamBuilder.php:77
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\addStaticMagicFromGlobals
‪addStaticMagicFromGlobals(IncludeInterface $parentNode, string $path)
Definition: TreeFromLineStreamBuilder.php:534
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\processConditionalIncludeTyposcript
‪processConditionalIncludeTyposcript(IncludeInterface $parentNode, ?string $condition, string $fileName)
Definition: TreeFromLineStreamBuilder.php:449
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\buildTree
‪buildTree(IncludeInterface $node, string $type, TokenizerInterface $tokenizer)
Definition: TreeFromLineStreamBuilder.php:81
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\processAtImport
‪processAtImport(string $fileSuffix, IncludeInterface $node, Token $atImportValueToken, LineInterface $atImportLine, bool $tryRelative=false)
Definition: TreeFromLineStreamBuilder.php:251
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded
‪static isLoaded(string $key)
Definition: ExtensionManagementUtility.php:54
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility
Definition: ExtensionManagementUtility.php:31
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\addSingleAtImportFile
‪addSingleAtImportFile(IncludeInterface $parentNode, string $absoluteFileName, string $path, LineInterface $atImportLine)
Definition: TreeFromLineStreamBuilder.php:353
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\addSingleIncludeTyposcriptFile
‪addSingleIncludeTyposcriptFile(IncludeInterface $parentNode, string $absoluteFileName, string $path, LineInterface $importKeywordOldLine)
Definition: TreeFromLineStreamBuilder.php:517
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface
Definition: IncludeInterface.php:39
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\importIncludeTyposcriptDirectoryRecursive
‪importIncludeTyposcriptDirectoryRecursive(IncludeInterface $nodeToAddTo, LineInterface $importKeywordOldLine, string $dirName, string $absoluteDirName, array $extensions)
Definition: TreeFromLineStreamBuilder.php:463
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\DefaultTypoScriptMagicKeyInclude
Definition: DefaultTypoScriptMagicKeyInclude.php:26
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\ConditionInclude
Definition: ConditionInclude.php:29
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface\isSplit
‪isSplit()
‪TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\buildTreeInternal
‪buildTreeInternal(IncludeInterface $node)
Definition: TreeFromLineStreamBuilder.php:114
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Line\ConditionLine
Definition: ConditionLine.php:29
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeTyposcriptInclude
Definition: IncludeTyposcriptInclude.php:25
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface\setSplit
‪setSplit()
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface\getLineStream
‪getLineStream()
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Token\AbstractToken\getValue
‪getValue()
Definition: AbstractToken.php:65
‪TYPO3\CMS\Core\TypoScript\Tokenizer\TokenizerInterface
Definition: TokenizerInterface.php:40
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:51
‪TYPO3\CMS\Core\TypoScript\Tokenizer\Line\LineStream
Definition: LineStream.php:29
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\ConditionIncludeTyposcriptInclude
Definition: ConditionIncludeTyposcriptInclude.php:28
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\ConditionElseInclude
Definition: ConditionElseInclude.php:34
‪TYPO3\CMS\Webhooks\Message\$identifier
‪identifier readonly string $identifier
Definition: FileAddedMessage.php:37
‪TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AtImportInclude
Definition: AtImportInclude.php:27