PageTsConfigLoader

class \TYPO3\CMS\Core\Configuration\Loader\PageTsConfigLoader

Traverses a root line of a pagetree up and includes all available TSconfig settings, including default setup. Then include lines are checked, and merged together into one string, ready to be parsed.

Deprecated

since TYPO3 v12, will be removed with v13. Use PageTsConfigFactory instead. When removing, also remove entries in core ServiceProvider, AbstractServiceProvider and Services.yaml.

Can be used in Frontend or Backend.

Have a look at the PageTsConfigParser which can then parse (and cache) this information based on the environment (Frontend / Backend / current page).

Currently, this accumulated information of the pages is NOT cached, as it would need to be tagged with any page, also including external files.

Table of Contents

Properties

$eventDispatcher  : EventDispatcherInterface
$globalTsConfig  : string

Methods

__construct()  : mixed
collect()  : array
Same as "load()" but returns an array of all parts. Only useful in the TYPO3 Backend for inspection purposes.
load()  : string
Main method to get all page TSconfig from the rootline including the defaultTSconfig settings.
setGlobalTsConfig()  : void

Properties

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

$globalTsConfig

protected string $globalTsConfig = ''

Methods

__construct()

public __construct(EventDispatcherInterface $eventDispatcher) : mixed

Parameters

$eventDispatcher : EventDispatcherInterface

collect()

Same as "load()" but returns an array of all parts. Only useful in the TYPO3 Backend for inspection purposes.

public collect(array $rootLine) : array

Parameters

$rootLine : array

Return values

array

load()

Main method to get all page TSconfig from the rootline including the defaultTSconfig settings.

public load(array $rootLine) : string

Parameters

$rootLine : array

Return values

string

setGlobalTsConfig()

public setGlobalTsConfig(string $globalTsConfig) : void

Parameters

$globalTsConfig : string
On this page