‪TYPO3CMS  9.5
TYPO3\CMS\Form\Mvc\Configuration\YamlSource Class Reference

Public Member Functions

 injectFilePersistenceSlot (FilePersistenceSlot $filePersistenceSlot)
 
array load (array $filesToLoad)
 
mixed save ($fileToSave, array $configuration)
 

Protected Member Functions

string getHeaderFromFile ($file)
 
string buildCombinedIdentifier (FolderInterface $folder, string $fileName)
 

Protected Attributes

FilePersistenceSlot $filePersistenceSlot
 

Detailed Description

Configuration source based on YAML files

Scope: frontend / backend

Definition at line 38 of file YamlSource.php.

Member Function Documentation

◆ buildCombinedIdentifier()

string TYPO3\CMS\Form\Mvc\Configuration\YamlSource::buildCombinedIdentifier ( FolderInterface  $folder,
string  $fileName 
)
protected

◆ getHeaderFromFile()

string TYPO3\CMS\Form\Mvc\Configuration\YamlSource::getHeaderFromFile (   $file)
protected

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

Parameters
File | string$file
Returns
‪string The header of the given YAML file

Definition at line 160 of file YamlSource.php.

Referenced by TYPO3\CMS\Form\Mvc\Configuration\YamlSource\save().

◆ injectFilePersistenceSlot()

TYPO3\CMS\Form\Mvc\Configuration\YamlSource::injectFilePersistenceSlot ( FilePersistenceSlot  $filePersistenceSlot)
Parameters
FilePersistenceSlot$filePersistenceSlot

Definition at line 47 of file YamlSource.php.

References TYPO3\CMS\Form\Mvc\Configuration\YamlSource\$filePersistenceSlot.

◆ load()

array TYPO3\CMS\Form\Mvc\Configuration\YamlSource::load ( array  $filesToLoad)

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

Parameters
array$filesToLoad
Returns
‪array
Exceptions
ParseErrorException
NoSuchFileException

Definition at line 62 of file YamlSource.php.

References TYPO3\CMS\Core\Utility\ArrayUtility\convertBooleanStringsToBooleanRecursive().

◆ save()

mixed TYPO3\CMS\Form\Mvc\Configuration\YamlSource::save (   $fileToSave,
array  $configuration 
)

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

Parameters
File | string$fileToSave‪The file to write to.
array$configuration‪The configuration to save
Returns
‪mixed
Exceptions
FileWriteException‪if the file could not be written

Definition at line 115 of file YamlSource.php.

References TYPO3\CMS\Form\Mvc\Configuration\YamlSource\buildCombinedIdentifier(), TYPO3\CMS\Form\Slot\FilePersistenceSlot\COMMAND_FILE_SET_CONTENTS, and TYPO3\CMS\Form\Mvc\Configuration\YamlSource\getHeaderFromFile().

Member Data Documentation

◆ $filePersistenceSlot

FilePersistenceSlot TYPO3\CMS\Form\Mvc\Configuration\YamlSource::$filePersistenceSlot
protected