hook_views_preview_info_alter(array &$rows, ViewExecutable $view)
Alter the view preview information.
The view preview information is optionally displayed when a view is previewed in the administrative UI. It includes query and performance statistics.
array $rows: An associative array with two keys:
\Drupal\views\ViewExecutable $view: The view object.
function hook_views_preview_info_alter(array &$rows, ViewExecutable $view) { // Adds information about the tables being queried by the view to the query // part of the info box. $rows['query'][] = array( t('<strong>Table queue</strong>'), count($view->query->table_queue) . ': (' . implode(', ', array_keys($view->query->table_queue)) . ')', ); }
© 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.api.php/function/hook_views_preview_info_alter/8.1.x