You are here

function _key_config_defaults in Key 7.3

Define the defaults for a key configuration.

Return value

array The defaults.

1 call to _key_config_defaults()
key_config_form in includes/key.admin.inc
Form constructor for the key configuration form.

File

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

Code

function _key_config_defaults() {
  $key_type_id = 'authentication';
  $key_provider_id = 'config';
  $key_type = key_get_plugin('key_type', $key_type_id);
  $key_provider = key_get_plugin('key_provider', $key_provider_id);
  $key_type_defaults = ($key_type_defaults_function = ctools_plugin_get_function($key_type, 'default configuration')) ? call_user_func($key_type_defaults_function) : array();
  $key_provider_defaults = ($key_provider_defaults_function = ctools_plugin_get_function($key_provider, 'default configuration')) ? call_user_func($key_provider_defaults_function) : array();
  $defaults = array(
    'id' => '',
    'label' => '',
    'description' => '',
    'key_type' => $key_type_id,
    'key_type_settings' => $key_type_defaults,
    'key_provider' => $key_provider_id,
    'key_provider_settings' => $key_provider_defaults,
  );
  return $defaults;
}