mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-11 19:24:10 +01:00
[ticket/13508] Add include_js twig tag as replacement for INCLUDEJS
PHPBB3-13508
This commit is contained in:
parent
9a7d88362f
commit
7efddcef54
@ -60,6 +60,7 @@ class extension extends \Twig\Extension\AbstractExtension
|
||||
return array(
|
||||
new \phpbb\template\twig\tokenparser\defineparser,
|
||||
new \phpbb\template\twig\tokenparser\includeparser,
|
||||
new \phpbb\template\twig\tokenparser\include_js,
|
||||
new \phpbb\template\twig\tokenparser\includejs,
|
||||
new \phpbb\template\twig\tokenparser\includecss,
|
||||
new \phpbb\template\twig\tokenparser\event($this->environment),
|
||||
|
32
phpBB/phpbb/template/twig/tokenparser/include_js.php
Normal file
32
phpBB/phpbb/template/twig/tokenparser/include_js.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\template\twig\tokenparser;
|
||||
|
||||
use Twig\Error\SyntaxError;
|
||||
use Twig\Node\Node;
|
||||
use Twig\Token;
|
||||
use Twig\TokenParser\AbstractTokenParser;
|
||||
|
||||
class include_js extends includejs
|
||||
{
|
||||
/**
|
||||
* Gets the tag name associated with this token parser.
|
||||
*
|
||||
* @return string The tag name
|
||||
*/
|
||||
public function getTag(): string
|
||||
{
|
||||
return 'include_js';
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user