IncludeStaticFileDatabaseInclude extends AbstractInclude
Main node created for sys_template "include_static_file": This has FileInclude or IncludeStaticFileFileInclude children, depending on specific string.
Tags
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
$children
protected
array<int, IncludeInterface>
$children
= []
$clear
protected
bool
$clear
= false
$isSplit
protected
bool
$isSplit
= false
$lineStream
protected
LineStream|null
$lineStream
= null
$name
protected
string
$name
= ''
$originalTokenLine
protected
LineInterface|null
$originalTokenLine
= null
$path
protected
string
$path
= ''
$pid
protected
int|null
$pid
= null
$root
protected
bool
$root
= false
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>addChild()
Child maintenance methods.
public
addChild(IncludeInterface $node) : void
Parameters
- $node : IncludeInterface
getIdentifier()
public
getIdentifier() : string
Return values
stringgetLineStream()
public
getLineStream() : LineStream|null
Return values
LineStream|nullgetName()
public
getName() : string
Return values
stringgetNextChild()
public
getNextChild() : iterable<string|int, IncludeInterface>
Return values
iterable<string|int, IncludeInterface>getOriginalLine()
public
getOriginalLine() : LineInterface|null
Return values
LineInterface|nullgetPath()
public
getPath() : string
Return values
stringgetPid()
public
getPid() : int|null
Return values
int|nullgetType()
A human-readable string derived from class name - Used in BE template analyzer
public
getType() : string
Return values
stringhasChildren()
public
hasChildren() : bool
Return values
boolisClear()
public
isClear() : bool
Return values
boolisRoot()
public
isRoot() : bool
Return values
boolisSplit()
public
isSplit() : bool
Return values
boolisSysTemplateRecord()
True for IncludeTypoScriptInclude - this node represents a sys_template record.
public
isSysTemplateRecord() : bool
When true, methods like isRoot() and isClear() are relevant.
Return values
boolsetClear()
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>