1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/15214] Fix rebasing and some other issues

PHPBB3-15214
This commit is contained in:
rxu
2024-06-05 21:58:05 +07:00
parent 8338ff9e56
commit 5e0dc9ef2e
10 changed files with 65 additions and 60 deletions

View File

@@ -35,30 +35,36 @@ class event extends \Twig\TokenParser\AbstractTokenParser
$this->phpbb_dispatcher = $phpbb_dispatcher;
$template_event_priority_array = [];
/**
* Allow assigning priority to template events
*f
* @event core.twig_tokenparser_constructor
* @var array template_event_priority_array Array with template event priority assignments per extension namespace
* Usage:
* '<author>_<extension_name>' => array(
* 'event/<template_event_name>' => priority_number,
* ),
* Example:
* 'phpbb_viglink' => array(
* 'event/acp_help_phpbb_stats_after' => 80,
* 'event/overall_footer_after' => 100,
* ),
* @since 3.3.12-RC1
*/
* Allow assigning priority to template events
*
* The higher number - the higher tempate event listener priority value is.
* In case of equal priority values, corresponding template event listeners will be handled in default compilation order.
* If not set, template event listener priority will be assigned to the value of 0.
*
* @event core.twig_tokenparser_constructor
* @var array template_event_priority_array Array with template event priority assignments per extension namespace
* Usage:
* '<author>_<extension_name>' => [
* 'event/<template_event_name>' => priority_number,
* ],
*
* Example:
* 'phpbb_viglink' => [
* 'event/acp_help_phpbb_stats_after' => 80,
* 'event/overall_footer_after' => 100,
* ],
*
* @since 4.0.0-a1
*/
if ($this->phpbb_dispatcher)
{
$vars = array('template_event_priority_array');
$vars = ['template_event_priority_array'];
extract($this->phpbb_dispatcher->trigger_event('core.twig_tokenparser_constructor', compact($vars)));
}
$this->template_event_priority_array = $template_event_priority_array;
unset($template_event_priority_array);
}
/**