mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00: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:
commit
585f692e31
12 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue