mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-08 17:56:52 +02:00
[ticket/13717] Set the assets after rendering the whole template
The goal being to be able to call INCLUDECSS/JS from anywhere in any tempalte or event PHPBB3-13717
This commit is contained in:
@@ -18,20 +18,8 @@ class includejs extends \phpbb\template\twig\node\includeasset
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_definition_name()
|
||||
public function get_setters_name()
|
||||
{
|
||||
return 'SCRIPTS';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function append_asset(\Twig_Compiler $compiler)
|
||||
{
|
||||
$compiler
|
||||
->raw("<script type=\"text/javascript\" src=\"' . ")
|
||||
->raw("\$asset_file")
|
||||
->raw(". '\"></script>\n")
|
||||
;
|
||||
return 'script';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user