test_basetheme.theme 826 Bytes
Newer Older
1 2 3 4 5 6
<?php

/**
 * @file
 * Add hooks for tests to use.
 */
7
use Drupal\views\Plugin\views\cache\CachePluginBase;
8 9 10 11 12 13 14 15 16 17 18 19 20
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().
 */
21
function test_basetheme_views_post_render(ViewExecutable $view, &$output, CachePluginBase $cache) {
22 23 24
  // We append the function name to the title for test to check for.
  $view->setTitle($view->getTitle() . ":" . __FUNCTION__);
}
25 26 27 28 29 30

/**
 * Implements hook_preprocess_HOOK() for theme_test_template_test templates.
 */
function test_basetheme_preprocess_theme_test_template_test(&$variables) {
}