‪TYPO3CMS  10.4
TYPO3\CMS\Core\Configuration\Richtext Class Reference

Public Member Functions

array getConfiguration (string $table, string $field, int $pid, string $recordType, array $tcaFieldConf)
 

Protected Member Functions

array loadConfigurationFromPreset (string $presetName='')
 
array getRtePageTsConfigOfPid (int $pid)
 
array convertPlainArrayToTypoScriptArray (array $plainArray)
 
array addFlattenedPageTsConfig (array $typoScriptArray)
 
array getPageTsConfiguration (string $table, string $field, int $pid, string $recordType)
 

Detailed Description

Prepare richtext configuration. Used in DataHandler and FormEngine

Internal class for the time being - may change / vanish any time

Todo:
‪When I grow up, I want to become a data provider

Definition at line 32 of file Richtext.php.

Member Function Documentation

◆ addFlattenedPageTsConfig()

array TYPO3\CMS\Core\Configuration\Richtext::addFlattenedPageTsConfig ( array  $typoScriptArray)
protected

Add all PageTS.RTE options keys to configuration without dots

We need to keep the dotted keys for backwards compatibility like ext:rtehtmlarea

Parameters
array$typoScriptArray‪TypoScriptArray
Returns
‪array array with config without dots added

Definition at line 147 of file Richtext.php.

Referenced by TYPO3\CMS\Core\Configuration\Richtext\getConfiguration().

◆ convertPlainArrayToTypoScriptArray()

array TYPO3\CMS\Core\Configuration\Richtext::convertPlainArrayToTypoScriptArray ( array  $plainArray)
protected

Returns an array with Typoscript the old way (with dot) Since the functionality in YAML is without the dots, but the new configuration is used without the dots this functionality adds also an explicit = 1 to the arrays

Parameters
array$plainArray‪An array
Returns
‪array array with TypoScript as usual (with dot)

Definition at line 123 of file Richtext.php.

Referenced by TYPO3\CMS\Core\Configuration\Richtext\loadConfigurationFromPreset().

◆ getConfiguration()

array TYPO3\CMS\Core\Configuration\Richtext::getConfiguration ( string  $table,
string  $field,
int  $pid,
string  $recordType,
array  $tcaFieldConf 
)

This is an intermediate class / method to retrieve RTE configuration until all core places use data providers to do that.

Parameters
string$table‪The table the field is in
string$field‪Field name
int$pid‪Real page id
string$recordType‪Record type value
array$tcaFieldConf‪['config'] section of TCA field
Returns
‪array

Definition at line 45 of file Richtext.php.

References TYPO3\CMS\Core\Configuration\Richtext\addFlattenedPageTsConfig(), TYPO3\CMS\Core\Configuration\Richtext\getPageTsConfiguration(), TYPO3\CMS\Core\Configuration\Richtext\loadConfigurationFromPreset(), and TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule().

◆ getPageTsConfiguration()

array TYPO3\CMS\Core\Configuration\Richtext::getPageTsConfiguration ( string  $table,
string  $field,
int  $pid,
string  $recordType 
)
protected

Load PageTS configuration for the RTE

Return RTE section of page TS, taking into account overloading via table, field and record type

Parameters
string$table‪The table the field is in
string$field‪Field name
int$pid‪Real page id
string$recordType‪Record type value
Returns
‪array

Definition at line 172 of file Richtext.php.

References TYPO3\CMS\Core\Configuration\Richtext\getRtePageTsConfigOfPid(), and TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule().

Referenced by TYPO3\CMS\Core\Configuration\Richtext\getConfiguration().

◆ getRtePageTsConfigOfPid()

array TYPO3\CMS\Core\Configuration\Richtext::getRtePageTsConfigOfPid ( int  $pid)
protected

Return RTE section of page TS

Parameters
int$pidPage ts of given pid
Returns
‪array RTE section of pageTs of given pid

Definition at line 110 of file Richtext.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getPagesTSconfig().

Referenced by TYPO3\CMS\Core\Configuration\Richtext\getPageTsConfiguration().

◆ loadConfigurationFromPreset()

array TYPO3\CMS\Core\Configuration\Richtext::loadConfigurationFromPreset ( string  $presetName = '')
protected

Load a configuration preset from an external resource (currently only YAML is supported). This is the default behaviour and can be overridden by pageTSconfig.

Parameters
string$presetName
Returns
‪array the parsed configuration

Definition at line 90 of file Richtext.php.

References $GLOBALS, and TYPO3\CMS\Core\Configuration\Richtext\convertPlainArrayToTypoScriptArray().

Referenced by TYPO3\CMS\Core\Configuration\Richtext\getConfiguration().