mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +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 includecss extends \phpbb\template\twig\node\includeasset
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_definition_name()
|
||||
public function get_setters_name()
|
||||
{
|
||||
return 'STYLESHEETS';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function append_asset(\Twig_Compiler $compiler)
|
||||
{
|
||||
$compiler
|
||||
->raw("<link href=\"' . ")
|
||||
->raw("\$asset_file . '\"")
|
||||
->raw(' rel="stylesheet" type="text/css" media="screen" />')
|
||||
;
|
||||
return 'stylesheet';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user