You are here

function views_ui_config_item_form_expose in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 8.3 views_ui/admin.inc \views_ui_config_item_form_expose()
  2. 6.3 includes/admin.inc \views_ui_config_item_form_expose()
  3. 7.3 includes/admin.inc \views_ui_config_item_form_expose()

Override handler for views_ui_edit_display_form

1 string reference to 'views_ui_config_item_form_expose'
views_handler_filter::show_expose_button in handlers/views_handler_filter.inc
Shortcut to display the expose/hide button.

File

includes/admin.inc, line 2544
admin.inc Provides the Views' administrative interface.

Code

function views_ui_config_item_form_expose($form, &$form_state) {
  $item =& $form_state['handler']->options;

  // flip
  $item['exposed'] = empty($item['exposed']);

  // If necessary, set new defaults:
  if ($item['exposed']) {
    $form_state['handler']
      ->expose_options();
  }
  $form_state['view']
    ->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
  views_ui_cache_set($form_state['view']);
  $form_state['rerender'] = TRUE;
  $form_state['rebuild'] = TRUE;
  $form_state['force_expose_options'] = TRUE;
}