[TYPO3-mvc] Where / how to store extension related data?

Xavier Perseguers xavier at typo3.org
Wed Feb 15 16:25:07 CET 2012


Hi,

>>> Check "image_autoresize" ext and see how Xavier made use of flexform to
>>> store user settings.
>>
>> OT: I like so much how I could hack the (old) EM to do that... :)
> 
> This is how I intend to do it:
> 
> $key = '$TYPO3_CONF_VARS[\'EXT\'][\'extConf\'][\'extName\']';
> $value = '\'' . serialize(array('someKey'=>'someValue')) . '\'';
> $instObj = t3lib_div::makeInstance('t3lib_install');
> $instObj->allowUpdateLocalConf = 1;
> $instObj->updateIdentity = 'EXT:extName';
> $lines = $instObj->writeToLocalconf_control();
> $instObj->setValueInLocalconfFile($lines, $key, $value, FALSE);
> $result = $instObj->writeToLocalconf_control($lines);
> 
> Do you think this would be ok?
> I tried it, and it seemed to work alright.

This really looks like what I used in the aforementioned extension and
as it works, then it's OK of course :)

-- 
Xavier Perseguers
Release Manager TYPO3 4.6

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org



More information about the TYPO3-project-typo3v4mvc mailing list