1
0
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:
Marc Alexander 2021-10-07 20:08:31 +02:00
parent 9a7d88362f
commit 7efddcef54
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
2 changed files with 33 additions and 0 deletions

View File

@ -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),

View 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';
}
}