SysTemplateTreeBuilder

FinalYes

Create a tree representing all TypoScript includes.

This is the 'middle' part of the TypoScript parsing process: The tokenizers as "lowest" structure create line streams from TypoScript, the AST builder as "highest" structure create the TypoScript object tree.

This structure gathers all TypoScript snippets that have to be tokenized, and creates a tree with include nodes and sub include nodes.

It is called in frontend (and backend "Template" module) with the page rootline, gets all attached sys_template records, gets their content and various sub includes and takes care of correct include order.

This class together with TreeFromTokenLineStreamBuilder also takes care of conditions and imports ("@import" and "<INCLUDE_TYPOSCRIPT:"): Those create child nodes in the tree. To evaluate conditions, the tree is later traversed, condition verdicts (true / false) are determined, to see if condition's child nodes should be considered in AST.

The IncludeTree is "runtime stateless": Constants values and conditions are not evaluated here, so the tree is always the same for a given rootline. This makes this structure cache-able: In frontend, the tree (or sub parts of it) is cached and fetched from cache for next call. This means the entire tree-building and tokenizing is suppressed. After that runtime information is added: Conditions are evaluated, and the AST is built from given IncludeTree.

Tags
internal:

Internal tree structure.

Table of Contents

Methods

__construct()  : mixed
getTreeBySysTemplateRowsAndSite()  : RootInclude

Methods


        
On this page

Search results