diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-11-08 12:21:06 -0500 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-11-17 16:42:40 -0500 |
| commit | 44d6dc4c4ccf969fd3d84f3b39bfd24ecd3a3f9d (patch) | |
| tree | 5dd030f606400f049141dbc9b086e6288b6dd0b7 /phpBB/includes/template/template.php | |
| parent | 0a29312d830c65dc293822c291bf2efd6f93a29b (diff) | |
| download | forums-44d6dc4c4ccf969fd3d84f3b39bfd24ecd3a3f9d.tar forums-44d6dc4c4ccf969fd3d84f3b39bfd24ecd3a3f9d.tar.gz forums-44d6dc4c4ccf969fd3d84f3b39bfd24ecd3a3f9d.tar.bz2 forums-44d6dc4c4ccf969fd3d84f3b39bfd24ecd3a3f9d.tar.xz forums-44d6dc4c4ccf969fd3d84f3b39bfd24ecd3a3f9d.zip | |
[feature/template-events] Convert a single style name to array of them.
This allows template code to know the entire style hierarchy for
templates being rendered.
PHPBB3-9550
Diffstat (limited to 'phpBB/includes/template/template.php')
| -rw-r--r-- | phpBB/includes/template/template.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/phpBB/includes/template/template.php b/phpBB/includes/template/template.php index 52c08326d5..4d257d2510 100644 --- a/phpBB/includes/template/template.php +++ b/phpBB/includes/template/template.php @@ -83,14 +83,13 @@ class phpbb_template /** * Name of the style that the template being compiled and/or rendered - * belongs to. + * belongs to, and its parents, in inheritance tree order. * - * This is used by hooks implementation to invoke style-specific - * template hooks. + * Used to invoke style-specific template events. * - * @var string + * @var array */ - private $style_name; + public $style_names; /** * Constructor. @@ -302,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->style_name, $this->locator, $this->phpbb_root_path, $this->extension_manager, $this->user); + $compile = new phpbb_template_compile($this->config['tpl_allow_php'], $this->style_names, $this->locator, $this->phpbb_root_path, $this->extension_manager, $this->user); if ($compile->compile_file_to_file($source_file, $output_file) !== false) { |
