[TYPO3-mvc] Where / how to store extension related data?
Stig Nørgaard Færch
snf at dkm.dk
Wed Feb 15 15:51:02 CET 2012
Den 15-02-2012 11:40, Xavier Perseguers skrev:
>>>>> In my BE module, I need a page where the user can edit some different
>>>>> settings and data for the extension.
>> 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.
More information about the TYPO3-project-typo3v4mvc