mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-23 01:51:31 +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:
@@ -19,7 +19,10 @@ namespace phpbb\template\twig;
|
|||||||
class definition
|
class definition
|
||||||
{
|
{
|
||||||
/** @var array **/
|
/** @var array **/
|
||||||
protected $definitions = array();
|
protected $definitions = array(
|
||||||
|
'SCRIPTS' => '__SCRIPTS_PLACEHOLDER__',
|
||||||
|
'STYLESHEETS' => '__STYLESHEETS_PLACEHOLDER__'
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a DEFINE'd variable
|
* Get a DEFINE'd variable
|
||||||
|
@@ -53,8 +53,6 @@ abstract class includeasset extends \Twig_Node
|
|||||||
->write("\$asset->add_assets_version('{$config['assets_version']}');\n")
|
->write("\$asset->add_assets_version('{$config['assets_version']}');\n")
|
||||||
->outdent()
|
->outdent()
|
||||||
->write("}\n")
|
->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);")
|
->write("\$this->getEnvironment()->get_assets_bag()->add_{$this->get_setters_name()}(\$asset);")
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user