‪TYPO3CMS  ‪main
TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeSourceAggregatorVisitor Class Reference
Inheritance diagram for TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeSourceAggregatorVisitor:
TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeVisitorInterface

Public Member Functions

 setStartNodeIdentifier (string $startNodeIdentifier)
 
 getSource ()
 
 visitBeforeChildren (IncludeInterface $include, int $currentDepth)
 
 visit (IncludeInterface $include, int $currentDepth)
 

Private Attributes

string $source = ''
 
string $startNodeIdentifier = ''
 
bool $startNodeHandled = false
 
int $startNodeDepth = 0
 
bool $isWithinStartNode = false
 

Detailed Description

Create a TypoScript source back from an IncludeTree. Inline source from "@import" and friends.

This visitor is used in ext:tstemplate TypoScript modules and ext:backend page TSconfig backend modules to show code of single includes with their resolved imports.

This is a specific Backend implementation and is not considered part of the Public TYPO3 API.

Definition at line 35 of file IncludeTreeSourceAggregatorVisitor.php.

Member Function Documentation

◆ getSource()

TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeSourceAggregatorVisitor::getSource ( )

◆ setStartNodeIdentifier()

TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeSourceAggregatorVisitor::setStartNodeIdentifier ( string  $startNodeIdentifier)

◆ visit()

TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeSourceAggregatorVisitor::visit ( IncludeInterface  $include,
int  $currentDepth 
)

Main visit method called for each node.

Implements TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeVisitorInterface.

Definition at line 88 of file IncludeTreeSourceAggregatorVisitor.php.

◆ visitBeforeChildren()

TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeSourceAggregatorVisitor::visitBeforeChildren ( IncludeInterface  $include,
int  $currentDepth 
)

Member Data Documentation

◆ $isWithinStartNode

bool TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeSourceAggregatorVisitor::$isWithinStartNode = false
private

Definition at line 51 of file IncludeTreeSourceAggregatorVisitor.php.

◆ $source

string TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeSourceAggregatorVisitor::$source = ''
private

◆ $startNodeDepth

int TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeSourceAggregatorVisitor::$startNodeDepth = 0
private

Definition at line 50 of file IncludeTreeSourceAggregatorVisitor.php.

◆ $startNodeHandled

bool TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeSourceAggregatorVisitor::$startNodeHandled = false
private

Definition at line 49 of file IncludeTreeSourceAggregatorVisitor.php.

◆ $startNodeIdentifier

string TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeSourceAggregatorVisitor::$startNodeIdentifier = ''
private

Restrict source rendering to specific includes. Used in BE template analyzer to output source of a single include and its sub includes. Since a single include could be included multiple times, we track if source for it has been build to suppress outputting it multiple times.

Definition at line 48 of file IncludeTreeSourceAggregatorVisitor.php.

Referenced by TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeSourceAggregatorVisitor\setStartNodeIdentifier().