I’m trying to manipulate system settings via the API. I can use getOption() to retrieve my options, but how do I write them back to the database?
Thanks!
$modx->setOption('site_start', $id);
<?php
/* Dont' save */
$modx->setOption('site_start', $id);
/* Save it on demand */
$modx->setOption('prefix.my_setting', $id, true);
/* Save prefix.my_setting in the db */
$modx->saveOptions();
setOption does not save to the database, however.
You’ll have to use getObject to do so.