You are here

function encrypt_get_configs_as_options in Encrypt 7.3

Same name and namespace in other branches
  1. 7.2 encrypt.module \encrypt_get_configs_as_options()

Get all configurations as options.

Useful for retrieving a list of configurations to be used as #options in form elements such as select, checkboxes, and radios.

Parameters

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

Return value

array An array of key-value pairs. The key is the configuration's machine- readable name and the value is its human-friendly label.

1 call to encrypt_get_configs_as_options()
encrypt_config_features_export_options in includes/encrypt.features.inc
 * Implements hook_features_export_options().  

File

./encrypt.module, line 211
Main Encrypt Drupal File

Code

function encrypt_get_configs_as_options($reset = FALSE) {
  static $options = array();
  if (!$options || $reset) {
    $configs = encrypt_get_configs($reset);
    foreach ($configs as $key => $config) {
      $options[$key] = $config['label'];
    }
  }
  return $options;
}