template.php

Same filename in this branch
  1. 7.x themes/seven/template.php
  2. 7.x themes/garland/template.php
  3. 7.x themes/bartik/template.php
Same filename in other branches
  1. 9 core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/Annotation/Template.php
  2. 8.9.x core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/Annotation/Template.php
  3. 10 core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/Annotation/Template.php
  4. 11.x core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/Annotation/Template.php

File

modules/simpletest/tests/themes/test_theme/template.php

View source
<?php


/**
 * Tests a theme overriding a suggestion of a base theme hook.
 */
function test_theme_theme_test__suggestion($variables) {
    return 'Theme hook implementor=test_theme_theme_test__suggestion(). Foo=' . $variables['foo'];
}

/**
 * Tests a theme implementing an alter hook.
 *
 * The confusing function name here is due to this being an implementation of
 * the alter hook invoked when the 'theme_test' module calls
 * drupal_alter('theme_test_alter').
 */
function test_theme_theme_test_alter_alter(&$data) {
    $data = 'test_theme_theme_test_alter_alter was invoked';
}

Functions

Title Deprecated Summary
test_theme_theme_test_alter_alter Tests a theme implementing an alter hook.
test_theme_theme_test__suggestion Tests a theme overriding a suggestion of a base theme hook.

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