You are here

function views_set_current_view in Views (for Drupal 7) 5

Same name and namespace in other branches
  1. 8.3 views.module \views_set_current_view()
  2. 6.3 views.module \views_set_current_view()
  3. 6.2 views.module \views_set_current_view()
  4. 7.3 views.module \views_set_current_view()
2 calls to views_set_current_view()
views_build_view in ./views.module
This builds the basic view.
views_get_current_view in ./views.module

File

./views.module, line 452

Code

function &views_set_current_view(&$view) {
  static $current_view = NULL;
  if ($view !== NULL) {
    unset($current_view);
    $current_view =& $view;
    unset($GLOBALS['current_view']);
    $GLOBALS['current_view'] =& $view;
  }
  return $current_view;
}