function views_ui_config_item_form_remove
3.x admin.inc | views_ui_config_item_form_remove($form, &$form_state) |
2.x admin.inc | views_ui_config_item_form_remove($form, &$form_state) |
Submit handler for removing an item from a view
File
- includes/
admin.inc, line 4581 - 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) = views_ui_standard_override_values($form, $form_state);
// If the display selection was changed toggle the override value.
if ($was_defaulted != $is_defaulted) {
$display = &$form_state['view']->display[$form_state['display_id']];
$display->handler->options_override($form, $form_state);
}
$form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], NULL);
// Write to cache
views_ui_cache_set($form_state['view']);
}