You are here

function key_provider_config_build_configuration_form in Key 7.3

The settings form.

Return value

array The settings form.

1 string reference to 'key_provider_config_build_configuration_form'
config.inc in plugins/key_provider/config.inc

File

plugins/key_provider/config.inc, line 42

Code

function key_provider_config_build_configuration_form($form, &$form_state) {
  $config = $form_state['storage']['key_config'];
  $plugin_config = $form_state['storage']['key_config']['key_provider_settings'] + key_provider_config_default_configuration();

  // If this is for an encryption key.
  $key_type = key_get_plugin('key_type', $config['key_type']);
  if ($key_type['group'] == 'encryption') {

    // Add an option to indicate that the value is Base64-encoded.
    $form['base64_encoded'] = array(
      '#type' => 'checkbox',
      '#title' => t('Base64-encoded'),
      '#description' => t('Checking this will store the key with Base64 encoding.'),
      '#default_value' => $plugin_config['base64_encoded'],
    );
  }
  return $form;
}