function views_ui_admin_settings_advanced

Form builder for the advanced admin settings page.

1 string reference to 'views_ui_admin_settings_advanced'
views_ui_menu in drupal/core/modules/views/views_ui/views_ui.module
Implements hook_menu().

File

drupal/core/modules/views/views_ui/admin.inc, line 1945
Provides the Views' administrative interface.

Code

function views_ui_admin_settings_advanced() {
  $form = array();
  $form['#attached']['css'] = ViewFormControllerBase::getAdminCSS();
  $config = config('views.settings');
  $form['cache'] = array(
    '#type' => 'details',
    '#title' => t('Caching'),
  );
  $form['cache']['skip_cache'] = array(
    '#type' => 'checkbox',
    '#title' => t('Disable views data caching'),
    '#description' => t("Views caches data about tables, modules and views available, to increase performance. By checking this box, Views will skip this cache and always rebuild this data when needed. This can have a serious performance impact on your site."),
    '#default_value' => $config
      ->get('skip_cache'),
  );
  $form['cache']['clear_cache'] = array(
    '#type' => 'submit',
    '#value' => t("Clear Views' cache"),
    '#submit' => array(
      'views_ui_tools_clear_cache',
    ),
  );
  $form['debug'] = array(
    '#type' => 'details',
    '#title' => t('Debugging'),
  );
  $form['debug']['sql_signature'] = array(
    '#type' => 'checkbox',
    '#title' => t('Add Views signature to all SQL queries'),
    '#description' => t("All Views-generated queries will include the name of the views and display 'view-name:display-name' as a string  at the end of the SELECT clause. This makes identifying Views queries in database server logs simpler, but should only be used when troubleshooting."),
    '#default_value' => $config
      ->get('sql_signature'),
  );
  $form['debug']['no_javascript'] = array(
    '#type' => 'checkbox',
    '#title' => t('Disable JavaScript with Views'),
    '#description' => t("If you are having problems with the JavaScript, you can disable it here. The Views UI should degrade and still be usable without javascript; it's just not as good."),
    '#default_value' => $config
      ->get('no_javascript'),
  );
  $form['debug']['debug_output'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable views performance statistics/debug messages via the Devel module'),
    '#description' => t("Check this to enable some Views query and performance statistics/debug messages <em>if Devel is installed</em>."),
    '#default_value' => $config
      ->get('debug.output'),
  );
  $regions = array();
  $regions['watchdog'] = t('Watchdog');
  if (module_exists('devel')) {
    $regions['message'] = t('Devel message(dpm)');
    $regions['drupal_debug'] = t('Devel logging (tmp://drupal_debug.txt)');
  }
  $form['debug']['debug_region'] = array(
    '#type' => 'select',
    '#title' => t('Page region to output performance statistics/debug messages'),
    '#default_value' => $config
      ->get('debug.region'),
    '#options' => $regions,
    '#states' => array(
      'visible' => array(
        ':input[name="views_devel_output"]' => array(
          'checked' => TRUE,
        ),
      ),
    ),
  );
  $options = views_fetch_plugin_names('display_extender');
  if (!empty($options)) {
    $form['extenders'] = array(
      '#type' => 'details',
    );
    $form['extenders']['display_extenders'] = array(
      '#title' => t('Display extenders'),
      '#default_value' => views_get_enabled_display_extenders(),
      '#options' => $options,
      '#type' => 'checkboxes',
      '#description' => t('Select extensions of the views interface.'),
    );
  }
  $form['actions']['#type'] = 'actions';
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save configuration'),
  );
  $form['#submit'][] = 'views_ui_admin_settings_advanced_submit';
  return $form;
}