test_basetheme.theme in Drupal 10
Same filename and directory in other branches
Add hooks for tests to use.
File
core/modules/system/tests/themes/test_basetheme/test_basetheme.themeView source
<?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_basetheme_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_basetheme_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__);
}
/**
* Implements hook_preprocess_HOOK() for theme_test_template_test templates.
*/
function test_basetheme_preprocess_theme_test_template_test(&$variables) {
}
/**
* Implements hook_preprocess_HOOK() for theme_test_function_suggestions theme functions.
*/
function test_basetheme_preprocess_theme_test_function_suggestions(&$variables) {
}
Functions
Name | Description |
---|---|
test_basetheme_preprocess_theme_test_function_suggestions | Implements hook_preprocess_HOOK() for theme_test_function_suggestions theme functions. |
test_basetheme_preprocess_theme_test_template_test | Implements hook_preprocess_HOOK() for theme_test_template_test templates. |
test_basetheme_views_post_render | Implements hook_views_post_render(). |
test_basetheme_views_pre_render | Implements hook_views_pre_render(). |