SettingsManager
class SettingsManager
Class SettingsManager
Properties
protected CRM_Utils_Cache_Interface | $cache | ||
protected Array | $bagsByDomain | ||
protected Array | $bagsByContact | ||
protected array|NULL | $mandatory | ||
protected bool | $useDefaults | Whether to use defaults. |
Methods
Ensure that all defaults values are included with all current and future bags.
Ensure that mandatory values are included with all current and future bags.
No description
No description
Determine the default settings.
Get a list of mandatory/overriden settings.
Parse mandatory settings.
Flush all in-memory and persistent caches related to settings.
Details
at line 94
__construct(CRM_Utils_Cache_Interface $cache)
at line 104
SettingsManager
useDefaults()
Ensure that all defaults values are included with all current and future bags.
at line 135
SettingsManager
useMandatory()
Ensure that mandatory values are included with all current and future bags.
If you call useMandatory multiple times, it will re-scan the global $civicrm_setting.
at line 155
SettingsBag
getBagByDomain(int|NULL $domainId)
at line 177
SettingsBag
getBagByContact(int|NULL $domainId, int|NULL $contactId)
at line 203
protected array
getDefaults(string $entity)
Determine the default settings.
at line 232
protected array
getMandatory(string $entity)
Get a list of mandatory/overriden settings.
at line 257
static array
parseMandatorySettings(array $civicrm_setting)
Parse mandatory settings.
In previous versions, settings were broken down into verbose+dynamic group names, e.g.
$civicrm_settings['Foo Bar Preferences']['foo'] = 'bar';
We now simplify to two simple groups, 'domain' and 'contact'.
$civicrm_settings['domain']['foo'] = 'bar';
However, the old groups are grand-fathered in as aliases.
at line 298
SettingsManager
flush()
Flush all in-memory and persistent caches related to settings.