function views_ui_cache_set
Same name in other branches
- 6.x-3.x views_ui.module \views_ui_cache_set()
Cache set.
Specialized cache function to add a flag to our view, include an appropriate include, and cache more easily.
33 calls to views_ui_cache_set()
- views_ui::clone_page in plugins/
export_ui/ views_ui.class.php - Main entry point to clone an item.
- views_ui_add_form_store_edit_submit in includes/
admin.inc - Process the add view form, 'continue'.
- views_ui_add_item_form_submit in includes/
admin.inc - Submit handler for adding new item(s) to a view.
- views_ui_config_item_extra_form_submit in includes/
admin.inc - Submit handler for configing new item(s) to a view.
- views_ui_config_item_form in includes/
admin.inc - Form to config_item items in the views UI.
File
-
./
views_ui.module, line 357
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;
}
ctools_include('object-cache');
// Let any future object know that this view has changed.
$view->changed = TRUE;
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;
foreach (array_keys($view->display) as $id) {
unset($view->display[$id]->handler);
unset($view->display[$id]->default_display);
}
ctools_object_cache_set('view', $view->name, $view);
}