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

Public Member Functions

 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)
 
 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 33 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 156 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 132 of file Richtext.php.

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

◆ getConfiguration()

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

Definition at line 45 of file Richtext.php.

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

◆ getPageTsConfiguration()

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

Definition at line 179 of file Richtext.php.

References TYPO3\CMS\Core\Configuration\Richtext\getRtePageTsConfigOfPid().

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 119 of file Richtext.php.

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 page TSconfig.

Returns
‪array the parsed configuration

Definition at line 92 of file Richtext.php.

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

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