[TYPO3-mvc] Howto: Manipulate override of settings (TS & Flexforms)
Henjo Hoeksma
me at henjohoeksma.nl
Thu Mar 24 15:10:45 CET 2011
On 2011-01-19 08:27:12 +0100, Georg Ringer said:
> 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
Hi Georg,
idea is great, except that both
Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK
and
Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS
return the values of the FlexForm?
Henjo
More information about the TYPO3-project-typo3v4mvc
mailing list