TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Extbase\Service\TypoScriptService Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Service\TypoScriptService:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 convertTypoScriptArrayToPlainArray (array $typoScriptArray)
 
 convertPlainArrayToTypoScriptArray (array $plainArray)
 

Detailed Description

Utilities to manage and convert TypoScript

Definition at line 20 of file TypoScriptService.php.

Member Function Documentation

◆ convertPlainArrayToTypoScriptArray()

TYPO3\CMS\Extbase\Service\TypoScriptService::convertPlainArrayToTypoScriptArray ( array  $plainArray)

Returns an array with Typoscript the old way (with dot).

Extbase converts the "classical" TypoScript (with trailing dot) to a format without trailing dot, to be more future-proof and not to have any conflicts with Fluid object accessor syntax. However, if you want to call legacy TypoScript objects, you somehow need the "old" syntax (because this is what TYPO3 is used to). With this method, you can convert the extbase TypoScript to classical TYPO3 TypoScript which is understood by the rest of TYPO3.

Parameters
array$plainArrayAn TypoScript Array with Extbase Syntax (without dot but with _typoScriptNodeValue)
Returns
array array with TypoScript as usual (with dot)

Definition at line 64 of file TypoScriptService.php.

◆ convertTypoScriptArrayToPlainArray()

TYPO3\CMS\Extbase\Service\TypoScriptService::convertTypoScriptArrayToPlainArray ( array  $typoScriptArray)

Removes all trailing dots recursively from TS settings array

Extbase converts the "classical" TypoScript (with trailing dot) to a format without trailing dot, to be more future-proof and not to have any conflicts with Fluid object accessor syntax.

Parameters
array$typoScriptArrayThe TypoScript array (e.g. array('foo' => 'TEXT', 'foo.' => array('bar' => 'baz')))
Returns
array e.g. array('foo' => array('_typoScriptNodeValue' => 'TEXT', 'bar' => 'baz'))

Definition at line 32 of file TypoScriptService.php.