diff options
| author | David King <imkingdavid@gmail.com> | 2012-12-10 14:09:10 -0500 |
|---|---|---|
| committer | David King <imkingdavid@gmail.com> | 2012-12-10 14:09:10 -0500 |
| commit | a9db155c28aa4885c1eef70dffe037172222f91d (patch) | |
| tree | c8cf9c258b1acbc7fe3a2ff2825a5bdc52595f58 /phpBB/includes/template/compile.php | |
| parent | eaa0319867783868a761c9ede5398d52351c38d5 (diff) | |
| parent | 0446886f91376c258df3729287824e505ff788b3 (diff) | |
| download | forums-a9db155c28aa4885c1eef70dffe037172222f91d.tar forums-a9db155c28aa4885c1eef70dffe037172222f91d.tar.gz forums-a9db155c28aa4885c1eef70dffe037172222f91d.tar.bz2 forums-a9db155c28aa4885c1eef70dffe037172222f91d.tar.xz forums-a9db155c28aa4885c1eef70dffe037172222f91d.zip | |
Merge remote-tracking branch 'p/feature/template-events' into develop
# By Oleg Pudeyev (36) and others
# Via Oleg Pudeyev
* p/feature/template-events: (47 commits)
[feature/template-events] Pass arguments in correct order.
[feature/template-events] Order extensions in mock extension manager.
[feature/template-events] Changes per imkingdavid's review.
[feature/template-events] Make style names private on template.
[feature/template-events] Test for event that is defined in parent style only.
[feature/template-events] Specify style names, add inheritance tests.
[feature/template-events] Normalize expected directory trees.
[feature/template-events] Allow dataset to be correctly selectable.
[feature/template-events] Dataset for template event testing with inheritance.
[feature/template-events] Use style names array in template filter.
[feature/template-events] Generate style names array in set_style.
[feature/template-events] Convert a single style name to array of them.
[feature/template-events] Chase dependency injection for template context.
[feature/template-events] Adjust template events test to use the dataset.
[feature/template-events] Create a dataset for template event tests.
[feature/template-events] Indentation fix.
[feature/template-events] Cosmetic changes.
[feature/template-events] Wording: wrongly -> improperly.
[feature/template-events] Indentation fix.
[feature/template-events] Rename template_name to style_name.
...
Diffstat (limited to 'phpBB/includes/template/compile.php')
| -rw-r--r-- | phpBB/includes/template/compile.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/phpBB/includes/template/compile.php b/phpBB/includes/template/compile.php index 22da21820e..fcdaf7abda 100644 --- a/phpBB/includes/template/compile.php +++ b/phpBB/includes/template/compile.php @@ -35,16 +35,23 @@ class phpbb_template_compile /** * Constructor. * - * @param bool @allow_php Whether PHP code will be allowed in templates (inline PHP code, PHP tag and INCLUDEPHP tag) + * @param bool $allow_php Whether PHP code will be allowed in templates (inline PHP code, PHP tag and INCLUDEPHP tag) + * @param array $style_names Name of style to which the template being compiled belongs and parents in style tree order * @param phpbb_style_resource_locator $locator Resource locator * @param string $phpbb_root_path Path to phpBB root directory + * @param phpbb_extension_manager $extension_manager Extension manager to use for finding template fragments in extensions; if null, template events will not be invoked + * @param phpbb_user $user Current user */ - public function __construct($allow_php, $locator, $phpbb_root_path) + public function __construct($allow_php, $style_names, $locator, $phpbb_root_path, $extension_manager = null, $user = null) { $this->filter_params = array( 'allow_php' => $allow_php, + 'style_names' => $style_names, 'locator' => $locator, - 'phpbb_root_path' => $phpbb_root_path + 'phpbb_root_path' => $phpbb_root_path, + 'extension_manager' => $extension_manager, + 'user' => $user, + 'template_compile' => $this, ); } |
