function views_ui_config_item_form_expose in Views (for Drupal 7) 8.3
Same name and namespace in other branches
- 6.3 includes/admin.inc \views_ui_config_item_form_expose()
- 6.2 includes/admin.inc \views_ui_config_item_form_expose()
- 7.3 includes/admin.inc \views_ui_config_item_form_expose()
Override handler for views_ui_edit_display_form
2 string references to 'views_ui_config_item_form_expose'
- FilterPluginBase::showExposeButton in lib/
Drupal/ views/ Plugin/ views/ filter/ FilterPluginBase.php - Shortcut to display the expose/hide button.
- SortPluginBase::showExposeButton in lib/
Drupal/ views/ Plugin/ views/ sort/ SortPluginBase.php - Shortcut to display the expose/hide button.
File
- views_ui/
admin.inc, line 2024 - 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']
->defaultExposeOptions();
}
$form_state['view']
->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
$form_state['view']
->addFormToStack($form_state['form_key'], $form_state['display_id'], array(
$form_state['type'],
$form_state['id'],
), TRUE, TRUE);
views_ui_cache_set($form_state['view']);
$form_state['rerender'] = TRUE;
$form_state['rebuild'] = TRUE;
$form_state['force_expose_options'] = TRUE;
}