function views_ui_cache_set in Views (for Drupal 7) 6.3
Same name and namespace in other branches
- 8.3 views_ui/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.
26 calls to views_ui_cache_set()
- views_ui_add_display_form_submit in includes/
admin.inc - Submit handler to add a display to a view.
- views_ui_add_form_submit in includes/
admin.inc - Process the add view form
- views_ui_add_item_form_submit in includes/
admin.inc - Submit handler for adding new item(s) to a view.
- views_ui_change_style_form_submit in includes/
admin.inc - Submit handler for configing new item(s) to a view.
- views_ui_clone_display_form_submit in includes/
admin.inc - Submit handler to add a clone to a display from a view.
File
- ./
views_ui.module, line 285 - views_ui.module Provide structure for the administrative interface to Views.
Code
function views_ui_cache_set(&$view) {
if (!empty($view->locked)) {
drupal_set_message(t('Changes cannot be made to a locked view.'), 'error');
return;
}
views_include('cache');
$view->changed = TRUE;
// let any future object know that this view has changed.
// Unset handlers; we don't want to write these into the cache
unset($view->display_handler);
unset($view->current_display);
unset($view->default_display);
$view->query = NULL;
foreach (array_keys($view->display) as $id) {
unset($view->display[$id]->handler);
unset($view->display[$id]->default_display);
}
views_object_cache_set('view', $view->name, $view);
}