SysTemplateInclude extends AbstractInclude

FinalYes

The main node created for sys_template rows.

Tags
internal:

Internal tree structure.

Table of Contents

Properties

$children  : array<int, IncludeInterface>
$clear  : bool
$isSplit  : bool
$lineStream  : LineStream|null
$name  : string
$originalTokenLine  : LineInterface|null
$path  : string
$pid  : int|null
$root  : bool

Methods

__serialize()  : array<string|int, mixed>
When storing to cache, we only store FE relevant properties and skip things like "name", "identifier" and friends. We also don't need the LineStream when a node is split.
addChild()  : void
Child maintenance methods.
getIdentifier()  : string
getLineStream()  : LineStream|null
getName()  : string
getNextChild()  : iterable<string|int, IncludeInterface>
getOriginalLine()  : LineInterface|null
getPath()  : string
getPid()  : int|null
getType()  : string
A human-readable string derived from class name - Used in BE template analyzer
hasChildren()  : bool
isClear()  : bool
isRoot()  : bool
isSplit()  : bool
isSysTemplateRecord()  : bool
True for IncludeTypoScriptInclude - this node represents a sys_template record.
setClear()  : void
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.
setIdentifier()  : void
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.
setLineStream()  : void
The source split into single lines by a tokenizer.
setName()  : void
A human-readable version of the identifier: Used in backend tree rendering.
setOriginalLine()  : void
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.
setPath()  : void
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".
setPid()  : void
Set to the pid of IncludeTypoScriptInclude's (sys_template records). Relevant in backend tree rendering only.
setRoot()  : void
Set to true for IncludeTypoScriptInclude's (sys_template records) when "root" flag is set.
setSplit()  : void
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.
serialize()  : array<string|int, mixed>

Properties

Methods

__serialize()

When storing to cache, we only store FE relevant properties and skip things like "name", "identifier" and friends. We also don't need the LineStream when a node is split.

public final __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

getIdentifier()

public getIdentifier() : string
Return values
string

getName()

public getName() : string
Return values
string

getPath()

public getPath() : string
Return values
string

getPid()

public getPid() : int|null
Return values
int|null

getType()

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

public getType() : string
Return values
string

hasChildren()

public hasChildren() : bool
Return values
bool

isClear()

public isClear() : bool
Return values
bool

isRoot()

public isRoot() : bool
Return values
bool

isSplit()

public isSplit() : bool
Return values
bool

isSysTemplateRecord()

True for IncludeTypoScriptInclude - this node represents a sys_template record.

public isSysTemplateRecord() : bool

When true, methods like isRoot() and isClear() are relevant.

Return values
bool

setClear()

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.

public setClear(bool $clear) : void
Parameters
$clear : bool

setIdentifier()

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.

public setIdentifier(string $identifier) : void

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.

Parameters
$identifier : string

setLineStream()

The source split into single lines by a tokenizer.

public setLineStream(LineStream|null $lineStream) : void
Parameters
$lineStream : LineStream|null

setName()

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

public setName(string $name) : void
Parameters
$name : string

setOriginalLine()

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.

public setOriginalLine(LineInterface $line) : void

Relevant in backend tree and source display only.

Parameters
$line : LineInterface

setPath()

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".

public setPath(string $path) : void

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.

Parameters
$path : string

setPid()

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

public setPid(int $pid) : void
Parameters
$pid : int

setRoot()

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

public setRoot(bool $root) : void
Parameters
$root : bool

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.

public setSplit() : void

This flag is set when a line stream is split and the children fully represent the source.

serialize()

protected serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results