function views_ui_admin_settings_advanced in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 8.3 views_ui/admin.inc \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 ./
views_ui.module - Implements hook_menu().
File
- includes/
admin.inc, line 5059 - Provides the Views' administrative interface.
Code
function views_ui_admin_settings_advanced() {
$form = array();
$form['#attached']['css'] = views_ui_get_admin_css();
$form['cache'] = array(
'#type' => 'fieldset',
'#title' => t('Caching'),
);
$form['cache']['views_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' => variable_get('views_skip_cache', FALSE),
);
$form['cache']['clear_cache'] = array(
'#type' => 'submit',
'#value' => t("Clear Views' cache"),
'#submit' => array(
'views_ui_tools_clear_cache',
),
);
$form['debug'] = array(
'#type' => 'fieldset',
'#title' => t('Debugging'),
);
$form['debug']['views_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' => variable_get('views_sql_signature', FALSE),
);
$form['debug']['views_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' => variable_get('views_no_javascript', FALSE),
);
$form['debug']['views_devel_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' => variable_get('views_devel_output', FALSE),
);
$form['locale'] = array(
'#type' => 'fieldset',
'#title' => t('Localization'),
);
$form['locale']['views_localization_plugin'] = array(
'#type' => 'radios',
'#title' => t('Translation method'),
'#options' => views_fetch_plugin_names('localization', NULL, array()),
'#default_value' => views_get_localization_plugin(),
'#description' => t('Select a translation method to use for Views data like header, footer, and empty text.'),
);
$form['locale']['views_localize_all'] = array(
'#type' => 'checkbox',
'#title' => t('Use same translation method for exported views'),
'#description' => t('Exported views will use Core translation by default. Enable this to always use the configured translation method.'),
'#default_value' => variable_get('views_localize_all', FALSE),
);
$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']['views_devel_region'] = array(
'#type' => 'select',
'#title' => t('Page region to output performance statistics/debug messages'),
'#default_value' => variable_get('views_devel_region', 'footer'),
'#options' => $regions,
'#dependency' => array(
'edit-views-devel-output' => array(
1,
),
),
);
$options = views_fetch_plugin_names('display_extender');
if (!empty($options)) {
$form['extenders'] = array(
'#type' => 'fieldset',
);
$form['extenders']['views_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.'),
);
}
return system_settings_form($form);
}