I need to create/update the name and descriptions of a some system settings via code.
I can create the setting with its key, type, value, namespace, and area settings with no problem and it shows up nicely in the Manager grid.
However, I can't set the name and description that appear in the Manager grid for users to tell them what these are. Looking at the MODX docs, that makes sense because these don't appear to be part of the modSystemSetting object, but I'm not clear how they actually do get set and stored. Is there a special method or a related object one has to work with? Can anyone help?
Here's the relevant code:
$newSettingProps=
array(
'key' => 'new_setting', //works
'name' => 'New Setting', //THIS VALUE IS IGNORED
'description' => 'New Test Desc', //THIS VALUE IS IGNORED
'xtype' => 'combo-boolean', //works
'namespace' => 'my_namespace', //works
'area' => 'Test', //works
'value' => '1', //works
);
$newSetting = $modx->newObject('modSystemSetting');
foreach ($newSettingProps as $key => $value) {
$newSetting->set($key,$value);
}
$newSetting->save();
Thank you...