YamlSource

readonly class \TYPO3\CMS\Form\Mvc\Configuration\YamlSource

Configuration source based on YAML files

Scope: frontend / backend

Table of Contents

Methods

__construct()  : mixed
load()  : array
Loads the specified configuration files and returns its merged content as an array.
save()  : void
Save the specified configuration array to the given file in YAML format.
buildCombinedIdentifier()  : string
getHeaderFromFile()  : string
Read the header part from the given file. That means, every line until the first non comment line is found.
loadFromFile()  : array
Load YAML configuration from a FAL file
loadFromFilePath()  : array
Load YAML configuration from a local file path

Methods

load()

Loads the specified configuration files and returns its merged content as an array.

public load(array $filesToLoad) : array

Parameters

$filesToLoad : array

Return values

array

save()

Save the specified configuration array to the given file in YAML format.

public save(File|string $fileToSave, array $configuration) : void

Parameters

$fileToSave : File|string

The file to write to.

$configuration : array

The configuration to save

Tags

throws
FileWriteException

if the file could not be written

getHeaderFromFile()

Read the header part from the given file. That means, every line until the first non comment line is found.

protected getHeaderFromFile(File|string $file) : string

Parameters

$file : File|string

Return values

string —

The header of the given YAML file

loadFromFilePath()

Load YAML configuration from a local file path

protected loadFromFilePath(string $filePath) : array

Parameters

$filePath : string

Tags

throws
ParseErrorException

Return values

array
On this page