From 7d414d04ca80b3dc5efc7ece4c3c28123a4e7e89 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Wed, 14 Mar 2012 22:57:58 +0200 Subject: [feature/merging-style-components] Moving template classes to style Moving includes/template/ to includes/style/, adding template_ prefix to classes that deal only with templates PHPBB3-10632 --- phpBB/includes/style/template_renderer_include.php | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 phpBB/includes/style/template_renderer_include.php (limited to 'phpBB/includes/style/template_renderer_include.php') diff --git a/phpBB/includes/style/template_renderer_include.php b/phpBB/includes/style/template_renderer_include.php new file mode 100644 index 0000000000..f5c9026abf --- /dev/null +++ b/phpBB/includes/style/template_renderer_include.php @@ -0,0 +1,60 @@ +path = $path; + $this->template = $template; + } + + /** + * Displays the template managed by this renderer by including + * the php file containing the template. + * + * @param phpbb_template_context $context Template context to use + * @param array $lang Language entries to use + */ + public function render($context, $lang) + { + $_template = $this->template; + $_tpldata = &$context->get_data_ref(); + $_rootref = &$context->get_root_ref(); + $_lang = $lang; + + include($this->path); + } +} -- cgit v1.2.1 From b7d84a586c1e253ff7075e80ab721db5c1101c9f Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Wed, 14 Mar 2012 23:12:11 +0200 Subject: [feature/merging-style-components] Renaming template classes Changing template classes prefixes from phpbb_template to phpbb_style (for classes that will work with styles) or phpbb_style_template (for classes that are specific to templates) PHPBB3-10632 --- phpBB/includes/style/template_renderer_include.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/style/template_renderer_include.php') diff --git a/phpBB/includes/style/template_renderer_include.php b/phpBB/includes/style/template_renderer_include.php index f5c9026abf..91c1a1bb65 100644 --- a/phpBB/includes/style/template_renderer_include.php +++ b/phpBB/includes/style/template_renderer_include.php @@ -22,7 +22,7 @@ if (!defined('IN_PHPBB')) * * @package phpBB3 */ -class phpbb_template_renderer_include implements phpbb_template_renderer +class phpbb_style_template_renderer_include implements phpbb_style_template_renderer { /** * Template path to be included. @@ -45,7 +45,7 @@ class phpbb_template_renderer_include implements phpbb_template_renderer * Displays the template managed by this renderer by including * the php file containing the template. * - * @param phpbb_template_context $context Template context to use + * @param phpbb_style_template_context $context Template context to use * @param array $lang Language entries to use */ public function render($context, $lang) -- cgit v1.2.1