function views_ui_edit_view_form_cancel in Views (for Drupal 7) 8.3
Same name and namespace in other branches
- 6.3 includes/admin.inc \views_ui_edit_view_form_cancel()
- 6.2 includes/admin.inc \views_ui_edit_view_form_cancel()
- 7.3 includes/admin.inc \views_ui_edit_view_form_cancel()
Submit handler for the edit view form.
1 string reference to 'views_ui_edit_view_form_cancel'
- ViewUI::buildEditForm in views_ui/
lib/ Drupal/ views_ui/ ViewUI.php - Form builder callback for editing a View.
File
- views_ui/
admin.inc, line 657 - Provides the Views' administrative interface.
Code
function views_ui_edit_view_form_cancel($form, &$form_state) {
// Remove this view from cache so edits will be lost.
drupal_container()
->get('user.tempstore')
->get('views')
->delete($form_state['view']->storage->name);
if (empty($form['view']->vid)) {
// I seem to have to drupal_goto here because I can't get fapi to
// honor the redirect target. Not sure what I screwed up here.
drupal_goto('admin/structure/views');
}
}