You are here

function views_set_page_view in Views (for Drupal 7) 8.3

Same name and namespace in other branches
  1. 6.3 views.module \views_set_page_view()
  2. 6.2 views.module \views_set_page_view()
  3. 7.3 views.module \views_set_page_view()

Set the current 'page view' that is being displayed so that it is easy for other modules or the theme to identify.

2 calls to views_set_page_view()
Page::execute in lib/Drupal/views/Plugin/views/display/Page.php
The display page handler returns a normal view, but it also does a drupal_set_title for the page, and does a views_set_page_view on the view.
views_get_page_view in ./views.module
Find out what, if any, page view is currently in use. Please note that this returns a reference, so be careful! You can unintentionally modify the $view object.

File

./views.module, line 1124
Primarily Drupal hooks and global API functions to manipulate views.

Code

function &views_set_page_view($view = NULL) {
  static $cache = NULL;
  if (isset($view)) {
    $cache = $view;
  }
  return $cache;
}