template.php

  1. drupal
    1. 5 themes/garland/template.php
    2. 6 themes/garland/template.php
    3. 7 themes/bartik/template.php
    4. 7 modules/simpletest/tests/themes/test_theme/template.php
    5. 7 themes/garland/template.php
    6. 7 themes/seven/template.php
    7. 8 core/modules/system/tests/themes/test_theme/template.php
    8. 8 core/themes/stark/template.php
    9. 8 core/themes/seven/template.php
    10. 8 core/themes/bartik/template.php

Functions & methods

NameDescription
test_theme_theme_test_alter_alterTests a theme implementing an alter hook.
test_theme_theme_test__suggestionTests a theme overriding a suggestion of a base theme hook.

File

modules/simpletest/tests/themes/test_theme/template.php
View source
  1. <?php
  2. /**
  3. * Tests a theme overriding a suggestion of a base theme hook.
  4. */
  5. function test_theme_theme_test__suggestion($variables) {
  6. return 'Theme hook implementor=test_theme_theme_test__suggestion(). Foo=' . $variables['foo'];
  7. }
  8. /**
  9. * Tests a theme implementing an alter hook.
  10. *
  11. * The confusing function name here is due to this being an implementation of
  12. * the alter hook invoked when the 'theme_test' module calls
  13. * drupal_alter('theme_test_alter').
  14. */
  15. function test_theme_theme_test_alter_alter(&$data) {
  16. $data = 'test_theme_theme_test_alter_alter was invoked';
  17. }
Login or register to post comments