
| Current Path : /var/www/html/strat/web/core/modules/system/tests/themes/test_subtheme/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/strat/web/core/modules/system/tests/themes/test_subtheme/test_subtheme.theme |
<?php
/**
* @file
* Add hooks for tests to use.
*/
use Drupal\views\Plugin\views\cache\CachePluginBase;
use Drupal\views\ViewExecutable;
/**
* Implements hook_views_pre_render().
*/
function test_subtheme_views_pre_render(ViewExecutable $view) {
// We append the function name to the title for test to check for.
$view->setTitle($view->getTitle() . ":" . __FUNCTION__);
}
/**
* Implements hook_views_post_render().
*/
function test_subtheme_views_post_render(ViewExecutable $view, &$output, CachePluginBase $cache) {
// We append the function name to the title for test to check for.
$view->setTitle($view->getTitle() . ":" . __FUNCTION__);
if ($view->id() == 'test_page_display') {
$output['#rows'][0]['#title'] = t('%total_rows items found.', ['%total_rows' => $view->total_rows]);
}
}
/**
* Implements hook_preprocess_HOOK() for theme_test_template_test templates.
*/
function test_subtheme_preprocess_theme_test_template_test(&$variables) {
}