From dda775c418593c254c463740636dd7fb4d352945 Mon Sep 17 00:00:00 2001 From: rxu Date: Sun, 23 Feb 2014 22:04:35 +0800 Subject: [ticket/12224] Add template wrapper method to assign block arrays Add one more wrapper template method for the function assign_block_vars() which takes a 2-dimensional array as a parameter and calls assign_block_vars() in a loop to assign the whole block loop at once. This can make the core a little bit more expendable from the point of developing extensions as it allows to pass the data to events before it's being assigned to template. PHPBB3-12224 --- phpBB/phpbb/template/base.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'phpBB/phpbb/template/base.php') diff --git a/phpBB/phpbb/template/base.php b/phpBB/phpbb/template/base.php index 6044effa1f..5bce79fd85 100644 --- a/phpBB/phpbb/template/base.php +++ b/phpBB/phpbb/template/base.php @@ -110,6 +110,16 @@ abstract class base implements template return $this; } + /** + * {@inheritdoc} + */ + public function assign_block_vars_array($blockname, array $block_vars_array) + { + $this->context->assign_block_vars_array($blockname, $block_vars_array); + + return $this; + } + /** * {@inheritdoc} */ -- cgit v1.2.1