function views_get_current_view

Find out what, if any, current view is currently in use.

Note that this returns a reference, so be careful! You can unintentionally modify the $view object.

Return value

\Drupal\views\ViewExecutable The current view object.

1 call to views_get_current_view()
ViewExecutable::preExecute in drupal/core/modules/views/lib/Drupal/views/ViewExecutable.php
Run attachments and let the display do what it needs to do prior to running.

File

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

Code

function &views_get_current_view() {
  return views_set_current_view();
}