mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
Merge pull request #1643 from rechosen/ticket/11777
[ticket/11777] Search for template listeners in the php event listeners way
This commit is contained in:
@@ -18,6 +18,12 @@ if (!defined('IN_PHPBB'))
|
||||
|
||||
class phpbb_template_twig_node_event extends Twig_Node
|
||||
{
|
||||
/**
|
||||
* The subdirectory in which all template listener files must be placed
|
||||
* @var string
|
||||
*/
|
||||
protected $listener_directory = 'event/';
|
||||
|
||||
/** @var Twig_Environment */
|
||||
protected $environment;
|
||||
|
||||
@@ -37,7 +43,7 @@ class phpbb_template_twig_node_event extends Twig_Node
|
||||
{
|
||||
$compiler->addDebugInfo($this);
|
||||
|
||||
$location = $this->getNode('expr')->getAttribute('name');
|
||||
$location = $this->listener_directory . $this->getNode('expr')->getAttribute('name') . '_listener';
|
||||
|
||||
foreach ($this->environment->get_phpbb_extensions() as $ext_namespace => $ext_path)
|
||||
{
|
||||
|
Reference in New Issue
Block a user