You are here

function key_get_configs_as_options in Key 7.2

Same name and namespace in other branches
  1. 7 key.module \key_get_configs_as_options()

Gets all key configurations as options, for use in forms.

Parameters

bool $reset: A flag to force the configurations to be retrieved from the database.

Return value

array An array of configurations, with names for keys and labels for values.

3 calls to key_get_configs_as_options()
key_config_features_export_options in includes/key_config.features.inc
 * Implements hook_features_export_options().  
key_encrypt_key_settings_form in modules/key_encrypt/plugins/key_providers/key.inc
Settings form for the Key Module key provider.
_key_element_expand in ./key.module
Process function to expand the key element.

File

./key.module, line 321
Provides the ability to manage keys, which can be used by other modules.

Code

function key_get_configs_as_options($reset = FALSE) {
  $options =& drupal_static(__FUNCTION__);
  if (!isset($options) || $reset) {
    $configs = key_get_configs($reset);
    $options = array();
    foreach ($configs as $name => $config) {
      $options[$name] = $config['label'];
    }
  }
  return $options;
}