SiteSettingsFactory

Read onlyYes
Attributes
#[Autoconfigure]
$public: true

Table of Contents

Properties

$cache  : PhpFrontend
$cacheIdentifier  : PackageDependentCacheIdentifier
$configPath  : string
$setRegistry  : SetRegistry
$settingsFileName  : string
$settingsTypeRegistry  : SettingsTypeRegistry
$yamlFileLoader  : YamlFileLoader

Methods

__construct()  : mixed
composeSettings()  : SiteSettings
createSettings()  : SiteSettings
Fetch the settings for a specific site and return the parsed Site Settings object.
createSettingsForKeys()  : SiteSettings
getSettings()  : SiteSettings
validateSettings()  : array<string|int, mixed>

Properties

$configPath

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

$settingsFileName

protected string $settingsFileName = 'settings.yaml'

Methods

__construct()

public __construct(string $configPath, SetRegistry $setRegistry, SettingsTypeRegistry $settingsTypeRegistry, YamlFileLoader $yamlFileLoader, PhpFrontend $cache, PackageDependentCacheIdentifier $cacheIdentifier[, string $settingsFileName = 'settings.yaml' ]) : mixed
Parameters
$configPath : string
$setRegistry : SetRegistry
$settingsTypeRegistry : SettingsTypeRegistry
$yamlFileLoader : YamlFileLoader
$cache : PhpFrontend
$cacheIdentifier : PackageDependentCacheIdentifier
$settingsFileName : string = 'settings.yaml'

composeSettings()

public composeSettings(array<string|int, mixed> $settingsTree, array<string|int, mixed> $sets) : SiteSettings
Parameters
$settingsTree : array<string|int, mixed>
$sets : array<string|int, mixed>
Internal
Return values
SiteSettings

createSettings()

Fetch the settings for a specific site and return the parsed Site Settings object.

public createSettings([array<string|int, mixed> $sets = [] ][, string|null $siteIdentifier = null ][, array<string|int, mixed> $inlineSettings = [] ]) : SiteSettings
Parameters
$sets : array<string|int, mixed> = []
$siteIdentifier : string|null = null
$inlineSettings : array<string|int, mixed> = []
Internal
Tags
todo

This method resolves placeholders during the loading, which is okay as this is only used in context where the replacement is needed. However, this may change in the future, for example if loading is needed for implementing a GUI for the settings - which should either get a dedicated method or a flag to control if placeholder should be resolved during yaml file loading or not. The SiteConfiguration save action currently avoid calling this method.

Return values
SiteSettings

createSettingsForKeys()

public createSettingsForKeys(array<string|int, mixed> $settingKeys, string $siteIdentifier[, array<string|int, mixed> $inlineSettings = [] ]) : SiteSettings
Parameters
$settingKeys : array<string|int, mixed>
$siteIdentifier : string
$inlineSettings : array<string|int, mixed> = []
Return values
SiteSettings

getSettings()

public getSettings(string $siteIdentifier, array<string|int, mixed> $siteConfiguration) : SiteSettings
Parameters
$siteIdentifier : string
$siteConfiguration : array<string|int, mixed>
Return values
SiteSettings

validateSettings()

protected validateSettings(array<string|int, mixed> $settings, array<string|int, mixed> $definitions) : array<string|int, mixed>
Parameters
$settings : array<string|int, mixed>
$definitions : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results