TypoScript Utility

Load and progress faster with TypoScript.

class Jar\Utilities\Utilities\TypoScriptUtility

Jar\Utilities\Utilities\TypoScriptUtility::get($path = null, $pageUid = null, $populated = false)

Loads current TypoScript like TypoScriptUtility::get('plugin.tx_jarfeditor.settings')

Parameters
  • $path (string|null) -- Dot notated TypoScript path.

  • $pageUid (int|null) -- PageUid from which page the TypoScript should be loaded (optional in Frontend).

  • $populated (bool) -- should the Data be populated (f.e. "element = TEXT / element.value = Bla" => "element = Bla").

Returns

The plain TypoScript array.


Jar\Utilities\Utilities\TypoScriptUtility::convertTypoScriptArrayToPlainArray($typoscriptArray)

Wrapper for the Core convertTypoScriptArrayToPlainArray

Parameters
  • $typoscriptArray (array) -- A TypoScript array.

Returns

The plain TypoScript array or "null" when not found.


Jar\Utilities\Utilities\TypoScriptUtility::populateTypoScriptConfiguration($conf, $cObj = null)

Resolves cObjects and leaves values without deeper configuration as they are

Parameters
  • $conf (array) -- Plain TypoScript array.

  • $cObj (null|ContentObjectRenderer) -- ContentObject which should be used.

Returns

The plain populated TypoScript array.

Example:

# converts this typoscript array from ...
   hello = world
   element = TEXT
   element.value = Bla
   tree.value = Blupp

# ... to this:
   hello = world
   element = Bla
   tree.value = Blupp