You are here

function key_get_key in Key 7.3

Same name and namespace in other branches
  1. 7 key.module \key_get_key()
  2. 7.2 key.module \key_get_key()

Gets information about a specific key configuration.

Parameters

string $id: The machine name of the configuration to get.

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

Return value

array A key configuration.

12 calls to key_get_key()
KeyBasicAdminTest::testConfigKeyProvider in ./key.test
Test the Configuration key provider.
KeyBasicAdminTest::testFileKeyProvider in ./key.test
Test the File key provider.
key_config_delete_confirm_submit in includes/key.admin.inc
Submit handler for key_config_delete_confirm().
key_config_delete_confirm_validate in includes/key.admin.inc
Form validate handler for key_config_delete_confirm().
key_config_features_export_render in includes/key_config.features.inc
Implements hook_features_export_render().

... See full list

File

./key.module, line 509
Main Key functionality and hook implementations.

Code

function key_get_key($id, $reset = FALSE) {
  $configs =& drupal_static(__FUNCTION__);
  if (!isset($configs) || $reset) {
    $configs = key_get_keys($reset);
  }
  if (array_key_exists($id, $configs)) {
    $config = $configs[$id];
  }
  else {
    $config = NULL;
  }
  return $config;
}