mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-20 07:42:09 +02:00
Merge pull request #4155 from marc1706/ticket/14446
[ticket/14446] Add predefined placeholder variables to twig definition * marc1706/ticket/14446: [ticket/14446] Add predefined placeholder variables to twig definition
This commit is contained in:
commit
724bd471a7
@ -19,7 +19,10 @@ namespace phpbb\template\twig;
|
||||
class definition
|
||||
{
|
||||
/** @var array **/
|
||||
protected $definitions = array();
|
||||
protected $definitions = array(
|
||||
'SCRIPTS' => '__SCRIPTS_PLACEHOLDER__',
|
||||
'STYLESHEETS' => '__STYLESHEETS_PLACEHOLDER__'
|
||||
);
|
||||
|
||||
/**
|
||||
* Get a DEFINE'd variable
|
||||
|
@ -53,8 +53,6 @@ abstract class includeasset extends \Twig_Node
|
||||
->write("\$asset->add_assets_version('{$config['assets_version']}');\n")
|
||||
->outdent()
|
||||
->write("}\n")
|
||||
->write("\$context['definition']->set('STYLESHEETS', '__STYLESHEETS_PLACEHOLDER__');\n")
|
||||
->write("\$context['definition']->set('SCRIPTS', '__SCRIPTS_PLACEHOLDER__');\n")
|
||||
->write("\$this->getEnvironment()->get_assets_bag()->add_{$this->get_setters_name()}(\$asset);")
|
||||
;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user