function views_ui_cache_set in Views (for Drupal 7) 8.3
Same name and namespace in other branches
- 6.3 views_ui.module \views_ui_cache_set()
- 6.2 views_ui.module \views_ui_cache_set()
- 7.3 views_ui.module \views_ui_cache_set()
Specialized cache function to add a flag to our view, include an appropriate include, and cache more easily.
29 calls to views_ui_cache_set()
- views_ui_add_form_store_edit_submit in views_ui/
admin.inc - Process the add view form, 'continue'.
- views_ui_config_item_extra_form_submit in views_ui/
admin.inc - Submit handler for configing new item(s) to a view.
- views_ui_config_item_form in views_ui/
admin.inc - Form to config_item items in the views UI.
- views_ui_config_item_form_add_group in views_ui/
admin.inc - Add a new group to the exposed filter groups.
- views_ui_config_item_form_build_group in views_ui/
admin.inc - Override handler for views_ui_edit_display_form
File
- views_ui/
views_ui.module, line 346 - Provide structure for the administrative interface to Views.
Code
function views_ui_cache_set(ViewUI $view) {
if (isset($view->locked) && is_object($view->locked) && $view->locked->owner != $GLOBALS['user']->uid) {
drupal_set_message(t('Changes cannot be made to a locked view.'), 'error');
return;
}
$view->changed = TRUE;
// let any future object know that this view has changed.
if (isset($view->current_display)) {
// Add the knowledge of the changed display, too.
$view->changed_display[$view->current_display] = TRUE;
unset($view->current_display);
}
// Unset handlers; we don't want to write these into the cache
unset($view->display_handler);
unset($view->default_display);
$view->query = NULL;
$view->displayHandlers = array();
drupal_container()
->get('user.tempstore')
->get('views')
->set($view->storage->name, $view);
}