mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-13 12:14:06 +02:00
[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
This commit is contained in:
@@ -131,6 +131,14 @@ interface template
|
||||
*/
|
||||
public function assign_block_vars($blockname, array $vararray);
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @return \phpbb\template\template $this
|
||||
*/
|
||||
public function assign_block_vars_array($blockname, array $block_vars_array);
|
||||
|
||||
/**
|
||||
* Change already assigned key variable pair (one-dimensional - single loop entry)
|
||||
*
|
||||
|
Reference in New Issue
Block a user