Mercurial > defr > drupal > core
annotate themes/engines/phptemplate/phptemplate.engine @ 20:e3d20ebd63d1 tip
Added tag 6.9 for changeset 3edae6ecd6c6
| author | Franck Deroche <franck@defr.org> | 
|---|---|
| date | Thu, 15 Jan 2009 10:16:10 +0100 | 
| parents | c1f4ac30525a | 
| children | 
| rev | line source | 
|---|---|
| webmaster@1 | 1 <?php | 
| webmaster@1 | 2 // $Id: phptemplate.engine,v 1.69 2007/10/02 16:19:23 dries Exp $ | 
| webmaster@1 | 3 | 
| webmaster@1 | 4 /** | 
| webmaster@1 | 5 * @file | 
| webmaster@1 | 6 * Handles integration of templates written in pure php with the Drupal theme system. | 
| webmaster@1 | 7 */ | 
| webmaster@1 | 8 | 
| webmaster@1 | 9 function phptemplate_init($template) { | 
| webmaster@1 | 10 $file = dirname($template->filename) .'/template.php'; | 
| webmaster@1 | 11 if (file_exists($file)) { | 
| webmaster@1 | 12 include_once "./$file"; | 
| webmaster@1 | 13 } | 
| webmaster@1 | 14 } | 
| webmaster@1 | 15 | 
| webmaster@1 | 16 /** | 
| webmaster@1 | 17 * Implementation of hook_theme to tell Drupal what templates the engine | 
| webmaster@1 | 18 * and the current theme use. The $existing argument will contain hooks | 
| webmaster@1 | 19 * pre-defined by Drupal so that we can use that information if | 
| webmaster@1 | 20 * we need to. | 
| webmaster@1 | 21 */ | 
| webmaster@1 | 22 function phptemplate_theme($existing, $type, $theme, $path) { | 
| webmaster@1 | 23 $templates = drupal_find_theme_functions($existing, array('phptemplate', $theme)); | 
| webmaster@1 | 24 $templates += drupal_find_theme_templates($existing, '.tpl.php', $path); | 
| webmaster@1 | 25 return $templates; | 
| webmaster@1 | 26 } | 
| webmaster@1 | 27 | 
