phptemplate.engine

  1. 7.x drupal/themes/engines/phptemplate/phptemplate.engine
  2. 5.x drupal/themes/engines/phptemplate/phptemplate.engine
  3. 6.x drupal/themes/engines/phptemplate/phptemplate.engine
  4. 8.x drupal/core/themes/engines/phptemplate/phptemplate.engine

Handles integration of PHP templates with the Drupal theme system.

Functions

Namesort descending Description
phptemplate_init Implements hook_init().
phptemplate_theme Implements hook_theme().

File

drupal/themes/engines/phptemplate/phptemplate.engine
View source
  1. <?php
  2. /**
  3. * @file
  4. * Handles integration of PHP templates with the Drupal theme system.
  5. */
  6. /**
  7. * Implements hook_init().
  8. */
  9. function phptemplate_init($template) {
  10. $file = dirname($template->filename) . '/template.php';
  11. if (file_exists($file)) {
  12. include_once DRUPAL_ROOT . '/' . $file;
  13. }
  14. }
  15. /**
  16. * Implements hook_theme().
  17. */
  18. function phptemplate_theme($existing, $type, $theme, $path) {
  19. $templates = drupal_find_theme_functions($existing, array($theme));
  20. $templates += drupal_find_theme_templates($existing, '.tpl.php', $path);
  21. return $templates;
  22. }