SiteConfiguration implements SingletonInterface

Responsibility: Handles the format of the configuration (currently yaml), and the location of the file system folder

Reads all available site configuration options, and puts them into Site objects.

Internal

Table of Contents

Interfaces

SingletonInterface
"empty" interface for singletons (marker interface pattern)

Properties

$cache  : PhpFrontend
$cacheIdentifier  : string
Identifier to store all configuration data in the core cache.
$configFileName  : string
Config yaml file name.
$configPath  : string
$contentSecurityFileName  : string
YAML file name with all settings related to Content-Security-Policies.
$eventDispatcher  : EventDispatcherInterface
$firstLevelCache  : array<string|int, mixed>|null
Cache stores all configuration as Site objects, as long as they haven't been changed.
$pageTSconfigFileName  : string
File naming containing page TSconfig definitions
$siteSettingsFactory  : SiteSettingsFactory
$typoScriptConstantsFileName  : string
File naming containing TypoScript Constants.
$typoScriptSetupFileName  : string
File naming containing TypoScript Setup.

Methods

__construct()  : mixed
getAllExistingSites()  : array<string|int, Site>
Return all site objects which have been found in the filesystem.
getAllSiteConfigurationPaths()  : array<string|int, mixed>
Returns an array of paths in which a site configuration is found.
load()  : array<string|int, mixed>
Load plain configuration without additional settings.
resolveAllExistingSites()  : array<string|int, Site>
Resolve all site objects which have been found in the filesystem.
resolveAllExistingSitesRaw()  : array<string|int, Site>
Resolve all site objects which have been found in the filesystem containing settings only from the `config.yaml` file ignoring values from the `settings.yaml` and `csp.yaml` file.
siteConfigurationChanged()  : mixed
warmupCaches()  : void
getAllSiteConfigurationFromFiles()  : array<string|int, mixed>
Read the site configuration from config files.
getContentSecurityPolicies()  : array<string|int, mixed>
getSiteTSconfig()  : SiteTSconfig|null
getSiteTypoScript()  : SiteTypoScript|null

Properties

$cacheIdentifier

Identifier to store all configuration data in the core cache.

protected string $cacheIdentifier = 'sites-configuration'
Internal

$configFileName

Config yaml file name.

protected string $configFileName = 'config.yaml'
Internal

$configPath

protected string $configPath
Attributes
#[Autowire]
'%env(TYPO3:configPath)%/sites'

$contentSecurityFileName

YAML file name with all settings related to Content-Security-Policies.

protected string $contentSecurityFileName = 'csp.yaml'
Internal

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

$firstLevelCache

Cache stores all configuration as Site objects, as long as they haven't been changed.

protected array<string|int, mixed>|null $firstLevelCache

This drastically improves performance as SiteFinder utilizes SiteConfiguration heavily

$pageTSconfigFileName

File naming containing page TSconfig definitions

protected string $pageTSconfigFileName = 'page.tsconfig'
Internal

$typoScriptConstantsFileName

File naming containing TypoScript Constants.

protected string $typoScriptConstantsFileName = 'constants.typoscript'
Internal

$typoScriptSetupFileName

File naming containing TypoScript Setup.

protected string $typoScriptSetupFileName = 'setup.typoscript'
Internal

Methods

getAllExistingSites()

Return all site objects which have been found in the filesystem.

public getAllExistingSites([bool $useCache = true ]) : array<string|int, Site>
Parameters
$useCache : bool = true
Return values
array<string|int, Site>

getAllSiteConfigurationPaths()

Returns an array of paths in which a site configuration is found.

public getAllSiteConfigurationPaths() : array<string|int, mixed>
Internal
Return values
array<string|int, mixed>

load()

Load plain configuration without additional settings.

public load(string $siteIdentifier) : array<string|int, mixed>

This method should only be used in case the original configuration as it exists in the file should be loaded, for example for writing / editing configuration.

All read related actions should be performed on the site entity.

Parameters
$siteIdentifier : string
Return values
array<string|int, mixed>

resolveAllExistingSites()

Resolve all site objects which have been found in the filesystem.

public resolveAllExistingSites([bool $useCache = true ]) : array<string|int, Site>
Parameters
$useCache : bool = true
Return values
array<string|int, Site>

resolveAllExistingSitesRaw()

Resolve all site objects which have been found in the filesystem containing settings only from the `config.yaml` file ignoring values from the `settings.yaml` and `csp.yaml` file.

public resolveAllExistingSitesRaw() : array<string|int, Site>
Internal

Not part of public API. Used as intermediate solution until settings are handled by a dedicated GUI.

Return values
array<string|int, Site>

siteConfigurationChanged()

public siteConfigurationChanged() : mixed
Attributes
#[AsEventListener]
$event: SiteConfigurationChangedEvent::class

getAllSiteConfigurationFromFiles()

Read the site configuration from config files.

protected getAllSiteConfigurationFromFiles([bool $useCache = true ]) : array<string|int, mixed>
Parameters
$useCache : bool = true
Tags
throws
InvalidDataException
Return values
array<string|int, mixed>

getContentSecurityPolicies()

protected getContentSecurityPolicies(string $siteIdentifier) : array<string|int, mixed>
Parameters
$siteIdentifier : string
Return values
array<string|int, mixed>

        
On this page

Search results