views_set_current_view

&views_set_current_view($view = NULL)

Set the current 'current view' that is being built/rendered so that it is easy for other modules or items in drupal_eval to identify

Return value

\Drupal\views\ViewExecutable

File

core/modules/views/views.module, line 485
Primarily Drupal hooks and global API functions to manipulate views.

Code

1
2
3
4
5
6
7
8
function &views_set_current_view($view = NULL) {
  static $cache = NULL;
  if (isset($view)) {
    $cache = $view;
  }
 
  return $cache;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.