1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 18:54:08 +02:00

[feature/template-events] Pass top-level template name to template filter.

This will be used to invoke template-specific hooks.

PHPBB3-9550
This commit is contained in:
Oleg Pudeyev
2012-03-16 00:22:42 -04:00
parent dd7c5183fb
commit a6c7fbc59d
3 changed files with 26 additions and 3 deletions

View File

@@ -81,6 +81,16 @@ class phpbb_template
*/
private $extension_manager;
/**
* Name of the top-level template being compiled and/or rendered.
*
* This is used by hooks implementation to invoke template-specific
* template hooks.
*
* @var string
*/
private $template_name;
/**
* Constructor.
*
@@ -291,7 +301,7 @@ class phpbb_template
return new phpbb_template_renderer_include($output_file, $this);
}
$compile = new phpbb_template_compile($this->config['tpl_allow_php'], $this->locator, $this->phpbb_root_path, $this->extension_manager);
$compile = new phpbb_template_compile($this->config['tpl_allow_php'], $this->template_name, $this->locator, $this->phpbb_root_path, $this->extension_manager);
if ($compile->compile_file_to_file($source_file, $output_file) !== false)
{