&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.
\Drupal\views\ViewExecutable The current view object.
function &views_get_current_view() { return views_set_current_view(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!views!views.module/function/views_get_current_view/8.1.x