Default values should already be merged within SettingsBag (which sits
under-the-hood, beneath Setting::getItem and Setting API). Don't see why
we need to explicitly check default in this form.
// we can handle all the ones defined in the metadata here. Others to be converted
foreach ($this->_settings as $setting => $group) {
- $settingMetaData = civicrm_api('setting', 'getfields', array('version' => 3, 'name' => $setting));
$this->_defaults[$setting] = civicrm_api('setting', 'getvalue', array(
'version' => 3,
'name' => $setting,
'group' => $group,
- 'default_value' => CRM_Utils_Array::value('default', $settingMetaData['values'][$setting]),
)
);
}