function views_get_current_view
Same name in other branches
- 9 core/modules/views/views.module \views_get_current_view()
- 8.9.x core/modules/views/views.module \views_get_current_view()
- 10 core/modules/views/views.module \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 core/
modules/ views/ src/ ViewExecutable.php - Runs attachments and lets the display do what it needs to before running.
File
-
core/
modules/ views/ views.module, line 240
Code
function &views_get_current_view() {
return views_set_current_view();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.