ThemeTestPreprocess.php

Same filename and directory in other branches
  1. 11.x core/modules/system/tests/modules/theme_test/src/ThemeTestPreprocess.php
  2. 10 core/modules/system/tests/modules/theme_test/src/ThemeTestPreprocess.php
  3. 9 core/modules/system/tests/modules/theme_test/src/ThemeTestPreprocess.php

Namespace

Drupal\theme_test

File

core/modules/system/tests/modules/theme_test/src/ThemeTestPreprocess.php

View source
<?php

declare (strict_types=1);
namespace Drupal\theme_test;


/**
 * Class to test preprocess callbacks.
 */
class ThemeTestPreprocess {
  
  /**
   * Preprocess callback for testing preprocess callbacks.
   *
   * @param array $variables
   *   An associative array containing:
   *   - foo: Text for testing preprocess callback.
   */
  public static function preprocess(&$variables) {
    $variables['foo'] = 'Make Drupal full of kittens again!';
  }

}

Classes

Title Deprecated Summary
ThemeTestPreprocess Class to test preprocess callbacks.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.