| Line # | Frequency | Source Line |
| 1 | | <?php |
| 2 | | // $Id: phptemplate.engine,v 1.69 2007/10/02 16:19:23 dries Exp $ |
| 3 | | |
| 4 | | /** |
| 5 | | * @file |
| 6 | | * Handles integration of templates written in pure php with the Drupal theme system. |
| 7 | | */ |
| 8 | | |
| 9 | | function phptemplate_init($template) { |
| 10 | 1 | $file = dirname($template->filename) .'/template.php'; |
| 11 | 1 | if (file_exists($file)) { |
| 12 | | include_once "./$file"; |
| 13 | | } |
| 14 | | } |
| 15 | | |
| 16 | | /** |
| 17 | | * Implementation of hook_theme to tell Drupal what templates the engine |
| 18 | | * and the current theme use. The $existing argument will contain hooks |
| 19 | | * pre-defined by Drupal so that we can use that information if |
| 20 | | * we need to. |
| 21 | | */ |
| 22 | | function phptemplate_theme($existing, $type, $theme, $path) { |
| 23 | | $templates = drupal_find_theme_functions($existing, array('phptemplate', $theme)); |
| 24 | | $templates += drupal_find_theme_templates($existing, '.tpl.php', $path); |
| 25 | | return $templates; |
| 26 | | } |
| 27 | | |