function key_get_configs in Key 7
Same name and namespace in other branches
- 7.2 key.module \key_get_configs()
Gets information about all key configurations.
Parameters
bool $reset: A flag to force the configurations to be retrieved from the database.
Return value
array An array of configurations.
5 calls to key_get_configs()
- key_get_config in ./
key.module - Gets information about a specific key configuration.
- key_get_configs_as_options in ./
key.module - Gets all key configurations as options, for use in forms.
- key_save_config in ./
key.module - Save a key configuration.
- key_ui_key_configs_list in modules/
key_ui/ includes/ key_ui.admin.inc - Menu callback; displays the list of key configurations.
- _key_configs_filter in ./
key.module - Filter an array of key configurations.
File
- ./
key.module, line 295 - Provides the ability to manage keys, which can be used by other modules.
Code
function key_get_configs($reset = FALSE) {
$configs =& drupal_static(__FUNCTION__);
if (!isset($configs) || $reset) {
$configs = db_query("SELECT * FROM {key_config} ORDER BY label ASC")
->fetchAllAssoc('name', PDO::FETCH_ASSOC);
// Unserialize provider_settings field.
foreach ($configs as $name => $config) {
if (!empty($config['provider_settings'])) {
$provider_settings = unserialize($config['provider_settings']);
$configs[$name]['provider_settings'] = $provider_settings;
}
}
}
return $configs;
}