‪TYPO3CMS  ‪main
TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface:
TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AbstractInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AbstractConditionInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AtImportInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\DefaultTypoScriptInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\DefaultTypoScriptMagicKeyInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\ExtensionStaticInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\FileInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeStaticFileDatabaseInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeStaticFileFileInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeTyposcriptInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\RootInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\SegmentInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\SiteInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\StringInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\SysTemplateInclude TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\TsConfigInclude

Public Member Functions

 getType ()
 setIdentifier (string $identifier)
 getIdentifier ()
 setName (string $name)
 getName ()
 setPath (string $path)
 getPath ()
 addChild (IncludeInterface $node)
 hasChildren ()
iterable< IncludeInterfacegetNextChild ()
 isSysTemplateRecord ()
 setLineStream (?LineStream $lineStream)
 getLineStream ()
 setOriginalLine (LineInterface $line)
 getOriginalLine ()
 setSplit ()
 isSplit ()
 setRoot (bool $root)
 isRoot ()
 setClear (bool $clear)
 isClear ()
 setPid (int $pid)
 getPid ()

Detailed Description

General interface of IncludeTree tree nodes.

The TreeBuilder classes return a tree of these nodes, with the root node being a RootInclude. Each "include type" is represented by an own class: There is for instance "SysTemplateInclude" for a node that represents a sys_template row, and DefaultTypoScriptInclude for the default TypoScript string included from TYPO3_CONF_VARS.

Nodes may have children, and a single stream of lines from the tokenizer may be split into multiple children: Each @import creates an own child node, and condition trigger splitting as well.

: Internal tree structure.

Definition at line 38 of file IncludeInterface.php.

Member Function Documentation

◆ addChild()

◆ getIdentifier()

◆ getLineStream()

◆ getName()

◆ getNextChild()

◆ getOriginalLine()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::getOriginalLine ( )

◆ getPath()

◆ getPid()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::getPid ( )

◆ getType()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::getType ( )

A human-readable string derived from class name - Used in BE template analyzer

Implemented in TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AbstractInclude.

◆ hasChildren()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::hasChildren ( )

◆ isClear()

◆ isRoot()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::isRoot ( )

◆ isSplit()

◆ isSysTemplateRecord()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::isSysTemplateRecord ( )

True for IncludeTypoScriptInclude - this node represents a sys_template record. When true, methods like isRoot() and isClear() are relevant.

Implemented in TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AbstractInclude, and TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\SysTemplateInclude.

◆ setClear()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::setClear ( bool  $clear)

Set to true for IncludeTypoScriptInclude's (sys_template records) when "clear constants" or "clear setup" is set. Depends on context if currently constants or setup are parsed.

Implemented in TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AbstractInclude.

◆ setIdentifier()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::setIdentifier ( string  $identifier)

An identifier for this include. Typically, a hash of some kind. This identifier is unique within the tree, by being created from the parent identifier plus something unique for this level like a counter. This identifier is used in the backend, when referencing single includes to be rendered. Calculating identifiers is initiated by calling setIdentifier() on RootNode, which will recurse the tree. Call this on the final tree, after include calculation finished, so include building itself does not need to fiddle with identifier updates. Note this value is skipped when persisting to caches since it's a Backend related thing that does not use cached context: When retrieving includes from cache (e.g. in Frontend), the identifier is null and calling the getter will throw an exception.

Implemented in TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AbstractInclude.

◆ setLineStream()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::setLineStream ( ?LineStream  $lineStream)

The source split into single lines by a tokenizer.

Implemented in TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AbstractInclude.

◆ setName()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::setName ( string  $name)

A human-readable version of the identifier: Used in backend tree rendering.

Implemented in TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AbstractInclude, and TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\RootInclude.

◆ setOriginalLine()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::setOriginalLine ( LineInterface  $line)

When an imports are handled, such a line is substituted by the included content. To be able to still output the original line, it is parked here. Relevant in backend tree and source display only.

Implemented in TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AbstractInclude.

◆ setPath()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::setPath ( string  $path)

This is set to non-empty string for includes that represent files. The file location is stored here, typically something like "EXT:my_extension/path/to/foo.typoscript". This is used when resolving file includes relative to a parent include, so a potential child node knows where to look relative to its parent path. Note this value is skipped when persisting to caches: The parent path information is no longer needed when a tree is fetched from cache since all children were attached already and don't need to be recalculated depending on their parent path value.

Implemented in TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AbstractInclude.

◆ setPid()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::setPid ( int  $pid)

Set to the pid of IncludeTypoScriptInclude's (sys_template records). Relevant in backend tree rendering only.

Implemented in TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AbstractInclude.

◆ setRoot()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::setRoot ( bool  $root)

Set to true for IncludeTypoScriptInclude's (sys_template records) when "root" flag is set.

Implemented in TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AbstractInclude.

◆ setSplit()

TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\IncludeInterface::setSplit ( )

When included line streams contain conditions or imports, the node is split into children that contain single segments of the source. The node itself is then just a container and the LineStream attached is irrelevant for further processing. This flag is set when a line stream is split and the children fully represent the source.

Implemented in TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\AbstractInclude.

Referenced by TYPO3\CMS\Core\TypoScript\IncludeTree\TreeFromLineStreamBuilder\buildTreeInternal().