SiteWriter

Read onlyYes

Writes Site objects into site configuration files.

Internal

Table of Contents

Properties

$configPath  : string
$eventDispatcher  : EventDispatcherInterface

Methods

__construct()  : mixed
createNewBasicSite()  : void
Creates a site configuration with one language "English" which is the de-facto default language for TYPO3 in general.
delete()  : void
Removes the config.yaml file of a site configuration.
rename()  : void
Renames a site identifier (and moves the folder)
write()  : void
Add or update a site configuration
writeSettings()  : void
findModified()  : array
findRemoved()  : array
protectPlaceholders()  : array<string, mixed>
Detects placeholders that have been introduced and handles* them.
sortConfiguration()  : array

Properties

$configPath read-only

protected string $configPath

$eventDispatcher read-only

protected EventDispatcherInterface $eventDispatcher

Methods

__construct()

public __construct(string $configPath, EventDispatcherInterface $eventDispatcher, YamlFileLoader $yamlFileLoader) : mixed
Parameters
$configPath : string
$eventDispatcher : EventDispatcherInterface
$yamlFileLoader : YamlFileLoader

createNewBasicSite()

Creates a site configuration with one language "English" which is the de-facto default language for TYPO3 in general.

public createNewBasicSite(string $identifier, int $rootPageId, string $base[, string[] $dependencies = [] ]) : void
Parameters
$identifier : string
$rootPageId : int
$base : string
$dependencies : string[] = []

Site set identifiers to add as dependencies

Tags
throws
SiteConfigurationWriteException

writeSettings()

public writeSettings(string $siteIdentifier, array $settings) : void
Parameters
$siteIdentifier : string
$settings : array

findModified()

protected static findModified(array $currentConfiguration, array $newConfiguration) : array
Parameters
$currentConfiguration : array
$newConfiguration : array
Return values
array

findRemoved()

protected static findRemoved(array $currentConfiguration, array $newConfiguration) : array
Parameters
$currentConfiguration : array
$newConfiguration : array
Return values
array

protectPlaceholders()

Detects placeholders that have been introduced and handles* them.

protected protectPlaceholders(array<string, mixed> $existingConfiguration, array<string, mixed> $modifiedConfiguration) : array<string, mixed>

(*) currently throws an exception, but could be purged or escaped as well

Parameters
$existingConfiguration : array<string, mixed>
$modifiedConfiguration : array<string, mixed>
Tags
throws
SiteConfigurationWriteException
Return values
array<string, mixed> —

sanitized configuration (currently not used, exception thrown before)

sortConfiguration()

protected sortConfiguration(array $newConfiguration) : array
Parameters
$newConfiguration : array
Return values
array
On this page

Search results