class SettingsMetadata

Class SettingsMetadata

Methods

static array
getMetadata(array $filters = [], int $domainID = NULL, bool $loadOptions = FALSE)

WARNING: This interface may change.

static array
loadSettingsMetaDataFolders(array $metaDataFolders)

Load the settings files defined in a series of folders.

static array
loadSettingsMetadata(array $metaDataFolder)

Load up settings metadata from files.

static 
_filterSettingsSpecification(array $filters, array $settingSpec)

Filter the settings metadata according to filters passed in. This is a convenience filter and allows selective reverting / filling of settings

static 
loadOptions(array $settingSpec)

Retrieve options from settings metadata

Details

at line 69
static array getMetadata(array $filters = [], int $domainID = NULL, bool $loadOptions = FALSE)

WARNING: This interface may change.

This provides information about the setting - similar to the fields concept for DAO information. As the setting is serialized code creating validation setting input needs to know the data type This also helps move information out of the form layer into the data layer where people can interact with it via the API or other mechanisms. In order to keep this consistent it is important the form layer also leverages it.

Note that this function should never be called when using the runtime getvalue function. Caching works around the expectation it will be called during setting administration

Function is intended for configuration rather than runtime access to settings

The following params will filter the result. If none are passed all settings will be returns

Parameters

array $filters
int $domainID
bool $loadOptions

Return Value

array the following information as appropriate for each setting - name - type - default - add (CiviCRM version added) - is_domain - is_contact - description - help_text - options - pseudoconstant

at line 101
static protected array loadSettingsMetaDataFolders(array $metaDataFolders)

Load the settings files defined in a series of folders.

Parameters

array $metaDataFolders List of folder paths.

Return Value

array

at line 121
static protected array loadSettingsMetadata(array $metaDataFolder)

Load up settings metadata from files.

Parameters

array $metaDataFolder

Return Value

array

at line 140
static protected _filterSettingsSpecification(array $filters, array $settingSpec)

Filter the settings metadata according to filters passed in. This is a convenience filter and allows selective reverting / filling of settings

Parameters

array $filters Filters to match against data.
array $settingSpec Metadata to filter.

at line 161
static protected loadOptions(array $settingSpec)

Retrieve options from settings metadata

Parameters

array $settingSpec