Full ELMS Learning Network documentation
phptemplate.engine
- cis7 themes/engines/phptemplate/phptemplate.engine
- cle7 themes/engines/phptemplate/phptemplate.engine
- ecd7 themes/engines/phptemplate/phptemplate.engine
- elmsmedia7 themes/engines/phptemplate/phptemplate.engine
- harmony7 themes/engines/phptemplate/phptemplate.engine
- icor7 themes/engines/phptemplate/phptemplate.engine
- meedjum_blog7 themes/engines/phptemplate/phptemplate.engine
- mooc7 themes/engines/phptemplate/phptemplate.engine
Handles integration of PHP templates with the Drupal theme system.
Functions
Name![]() |
Description |
---|---|
phptemplate_theme | Implements hook_theme(). |
phptemplate_init | Implements hook_init(). |
File
themes/engines/phptemplate/phptemplate.engineView source
- <?php
-
- /**
- * @file
- * Handles integration of PHP templates with the Drupal theme system.
- */
-
- /**
- * Implements hook_init().
- */
- function phptemplate_init($template) {
- $file = dirname($template->filename) . '/template.php';
- if (file_exists($file)) {
- include_once DRUPAL_ROOT . '/' . $file;
- }
- }
-
- /**
- * Implements hook_theme().
- */
- function phptemplate_theme($existing, $type, $theme, $path) {
- $templates = drupal_find_theme_functions($existing, array($theme));
- $templates += drupal_find_theme_templates($existing, '.tpl.php', $path);
- return $templates;
- }
-