aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/template/context.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-03-10 23:49:37 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-03-10 23:49:37 +0100
commit235f7c3721f792e0f732ed086e1118a2f08e37a6 (patch)
treea8e34772c5f685b6b0ba3dc1e7b90c6db2f8457e /phpBB/phpbb/template/context.php
parentc169583dc3c551bc08fc217e0d5bb5dd6022ec57 (diff)
parentd29514f3e795374a653d3b9fa96c80dbefff449f (diff)
downloadforums-235f7c3721f792e0f732ed086e1118a2f08e37a6.tar
forums-235f7c3721f792e0f732ed086e1118a2f08e37a6.tar.gz
forums-235f7c3721f792e0f732ed086e1118a2f08e37a6.tar.bz2
forums-235f7c3721f792e0f732ed086e1118a2f08e37a6.tar.xz
forums-235f7c3721f792e0f732ed086e1118a2f08e37a6.zip
Merge remote-tracking branch 'rxu3/ticket/12224' into develop
* rxu3/ticket/12224: [ticket/12224] Add assign_block_vars_array() test. [ticket/12224] Add template wrapper method to assign block arrays
Diffstat (limited to 'phpBB/phpbb/template/context.php')
-rw-r--r--phpBB/phpbb/template/context.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/phpBB/phpbb/template/context.php b/phpBB/phpbb/template/context.php
index 0b929f4934..a222fbb69e 100644
--- a/phpBB/phpbb/template/context.php
+++ b/phpBB/phpbb/template/context.php
@@ -200,6 +200,22 @@ class context
}
/**
+ * Assign key variable pairs from an array to a whole specified block loop
+ *
+ * @param string $blockname Name of block to assign $block_vars_array to
+ * @param array $block_vars_array An array of hashes of variable name => value pairs
+ */
+ public function assign_block_vars_array($blockname, array $block_vars_array)
+ {
+ foreach ($block_vars_array as $vararray)
+ {
+ $this->assign_block_vars($blockname, $vararray);
+ }
+
+ return true;
+ }
+
+ /**
* Change already assigned key variable pair (one-dimensional - single loop entry)
*
* An example of how to use this function: