views_ui_test.module in Drupal 9
Same filename and directory in other branches
Helper module for Views UI tests.
File
core/modules/views_ui/tests/modules/views_ui_test/views_ui_test.moduleView source
<?php
/**
* @file
* Helper module for Views UI tests.
*/
/**
* Implements hook_views_preview_info_alter().
*
* Add a row count row to the live preview area.
*/
function views_ui_test_views_preview_info_alter(&$rows, $view) {
$data = [
'#markup' => t('Test row count'),
];
$data['#attached']['library'][] = 'views_ui_test/views_ui_test.test';
$rows['query'][] = [
[
'data' => $data,
],
count($view->result),
];
}
Functions
Name | Description |
---|---|
views_ui_test_views_preview_info_alter | Implements hook_views_preview_info_alter(). |