mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/14944] Add possibility to search for template loop indexes by key
Adds a new function to the template interface, and implements it in the context class. The function returns the ordinal index for a specified key, with the same structure that the key for alter_block_array. Reuses same code. PHPBB3-14944
This commit is contained in:
@@ -132,6 +132,14 @@ abstract class base implements template
|
||||
return $this->context->alter_block_array($blockname, $vararray, $key, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function find_key_index($blockname, $key = false)
|
||||
{
|
||||
return $this->context->find_key_index($blockname, $key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls hook if any is defined.
|
||||
*
|
||||
|
Reference in New Issue
Block a user