[TYPO3-mvc] Howto: Manipulate override of settings (TS & Flexforms)

Georg Ringer mail at ringerge.org
Wed Jan 19 08:27:12 CET 2011


Hi,

maybe someone is interested in a little function I wrote in one of the
last days.

Proplem was:
There is an automatic override of configurations between Flexforms &
TypoScript. If TS states: settings.fo = 123 and there is a flexform
field settings.fo and left empty the result will be
$this->settings['fo'] => empty.

Additional information:
I know doing correct merging is not that simple because how can be
achieved to have no empty default values on the one hand but on the
other the possibility to make an option empty.

Solution:
I created a function injectConfigurationManager inside my controller,
get the merged configuration and the one from TS.
"settings.overrideFlexformSettingsIfEmpty" can be filled with a
commaseperated list of keys. For every key is checked: If its value is
empty in the final configuration it is overriden by the value of TS.

Code is here: http://pastebin.com/mdGiDud5

Comments are of course welcome
Georg


More information about the TYPO3-project-typo3v4mvc mailing list