function views_ui_config_item_form_remove in Views (for Drupal 7) 8.3
Same name and namespace in other branches
- 6.3 includes/admin.inc \views_ui_config_item_form_remove()
- 6.2 includes/admin.inc \views_ui_config_item_form_remove()
- 7.3 includes/admin.inc \views_ui_config_item_form_remove()
Submit handler for removing an item from a view
File
- views_ui/
admin.inc, line 2007 - Provides the Views' administrative interface.
Code
function views_ui_config_item_form_remove($form, &$form_state) {
// Store the item back on the view
list($was_defaulted, $is_defaulted) = $form_state['view']
->getOverrideValues($form, $form_state);
// If the display selection was changed toggle the override value.
if ($was_defaulted != $is_defaulted) {
$display =& $form_state['view']->displayHandlers[$form_state['display_id']];
$display
->optionsOverride($form, $form_state);
}
$form_state['view']
->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], NULL);
// Write to cache
views_ui_cache_set($form_state['view']);
}