You are here

function visualization_settings_form in Visualization API 7

Settings form for visualization.

1 string reference to 'visualization_settings_form'
visualization_menu in ./visualization.module
Implements hook_menu().

File

./visualization.admin.inc, line 10
Settings form.

Code

function visualization_settings_form($form, &$form_state) {
  ctools_include('plugins');
  $options = array();
  foreach (ctools_get_plugins('visualization', 'library') as $id => $plugin) {
    if ($plugin['handler']
      ->available()) {
      $options[$id] = $plugin['label'];
    }
  }
  $form['library'] = array(
    '#type' => 'select',
    '#title' => t('Preferred charting library'),
    '#options' => $options,
    '#description' => t('Your charting library of preference will be used when generating charts (as long as it offers support for the requested type). The available options are the charting libraries detected on your system, please refer to the help section for more information about enabling more libraries.'),
    '#default_value' => variable_get('visualization', 'gva'),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save configuration'),
  );
  return $form;
}