public ViewUI::cacheSet()
Sets a cached view object in the user tempstore.
File
- core/modules/views_ui/src/ViewUI.php, line 857
Class
- ViewUI
- Stores UI related temporary settings.
Namespace
Drupal\views_ui
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | public function cacheSet() { if ( $this ->isLocked()) { drupal_set_message(t( 'Changes cannot be made to a locked view.' ), 'error' ); return ; } // Let any future object know that this view has changed. $this ->changed = TRUE; $executable = $this ->getExecutable(); if (isset( $executable ->current_display)) { // Add the knowledge of the changed display, too. $this ->changed_display[ $executable ->current_display] = TRUE; $executable ->current_display = NULL; } // Unset handlers. We don't want to write these into the cache. $executable ->display_handler = NULL; $executable ->default_display = NULL; $executable ->query = NULL; $executable ->displayHandlers = NULL; \Drupal::service( 'user.shared_tempstore' )->get( 'views' )->set( $this ->id(), $this ); } |
Please login to continue.