diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-08-10 02:26:16 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-08-10 03:32:27 +0200 |
commit | e7e6d45789d4084b98a9c6227a42976e4a1d8f7f (patch) | |
tree | 9ede14c36b2bd9f9ee1ef0ac3b2b563ec4d0d4cf /phpBB/phpbb | |
parent | 59b5ab4866e4c687c9157898110fd0e556f6c6ac (diff) | |
download | forums-e7e6d45789d4084b98a9c6227a42976e4a1d8f7f.tar forums-e7e6d45789d4084b98a9c6227a42976e4a1d8f7f.tar.gz forums-e7e6d45789d4084b98a9c6227a42976e4a1d8f7f.tar.bz2 forums-e7e6d45789d4084b98a9c6227a42976e4a1d8f7f.tar.xz forums-e7e6d45789d4084b98a9c6227a42976e4a1d8f7f.zip |
[ticket/12957] Update the constructions of the template engine
PHPBB3-12957
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/template/twig/environment.php | 1 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/lexer.php | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/phpbb/template/twig/environment.php b/phpBB/phpbb/template/twig/environment.php index f6d9b73178..b3f57b016f 100644 --- a/phpBB/phpbb/template/twig/environment.php +++ b/phpBB/phpbb/template/twig/environment.php @@ -79,6 +79,7 @@ class environment extends \Twig_Environment if (null === $this->lexer) { $this->lexer = $this->container->get('template.twig.lexer'); + $this->lexer->set_environment($this); } return $this->lexer; diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php index c5dc7273ba..a7848738bb 100644 --- a/phpBB/phpbb/template/twig/lexer.php +++ b/phpBB/phpbb/template/twig/lexer.php @@ -15,6 +15,11 @@ namespace phpbb\template\twig; class lexer extends \Twig_Lexer { + public function set_environment(\Twig_Environment $env) + { + $this->env = $env; + } + public function tokenize($code, $filename = null) { // Our phpBB tags |