mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-17 08:48:53 +00:00
[ticket/11667] Make functions abstract in includeasset
Also comment properly PHPBB3-11667
This commit is contained in:
parent
1d55709e13
commit
41d8bfa974
3 changed files with 35 additions and 8 deletions
|
@ -62,4 +62,19 @@ abstract class phpbb_template_twig_node_includeasset extends Twig_Node
|
||||||
->raw("\n');\n")
|
->raw("\n');\n")
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the definition name
|
||||||
|
*
|
||||||
|
* @return string (e.g. 'SCRIPTS')
|
||||||
|
*/
|
||||||
|
abstract public function get_definition_name();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Append the output code for the asset
|
||||||
|
*
|
||||||
|
* @param Twig_Compiler A Twig_Compiler instance
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
abstract protected function append_asset(Twig_Compiler $compiler);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,16 +9,22 @@
|
||||||
|
|
||||||
class phpbb_template_twig_node_includecss extends phpbb_template_twig_node_includeasset
|
class phpbb_template_twig_node_includecss extends phpbb_template_twig_node_includeasset
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Get the definition name
|
||||||
|
*
|
||||||
|
* @return string (e.g. 'SCRIPTS')
|
||||||
|
*/
|
||||||
public function get_definition_name()
|
public function get_definition_name()
|
||||||
{
|
{
|
||||||
return 'STYLESHEETS';
|
return 'STYLESHEETS';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compiles the node to PHP.
|
* Append the output code for the asset
|
||||||
*
|
*
|
||||||
* @param Twig_Compiler A Twig_Compiler instance
|
* @param Twig_Compiler A Twig_Compiler instance
|
||||||
*/
|
* @return null
|
||||||
|
*/
|
||||||
public function append_asset(Twig_Compiler $compiler)
|
public function append_asset(Twig_Compiler $compiler)
|
||||||
{
|
{
|
||||||
$compiler
|
$compiler
|
||||||
|
|
|
@ -9,16 +9,22 @@
|
||||||
|
|
||||||
class phpbb_template_twig_node_includejs extends phpbb_template_twig_node_includeasset
|
class phpbb_template_twig_node_includejs extends phpbb_template_twig_node_includeasset
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Get the definition name
|
||||||
|
*
|
||||||
|
* @return string (e.g. 'SCRIPTS')
|
||||||
|
*/
|
||||||
public function get_definition_name()
|
public function get_definition_name()
|
||||||
{
|
{
|
||||||
return 'SCRIPTS';
|
return 'SCRIPTS';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compiles the node to PHP.
|
* Append the output code for the asset
|
||||||
*
|
*
|
||||||
* @param Twig_Compiler A Twig_Compiler instance
|
* @param Twig_Compiler A Twig_Compiler instance
|
||||||
*/
|
* @return null
|
||||||
|
*/
|
||||||
protected function append_asset(Twig_Compiler $compiler)
|
protected function append_asset(Twig_Compiler $compiler)
|
||||||
{
|
{
|
||||||
$config = $this->environment->get_phpbb_config();
|
$config = $this->environment->get_phpbb_config();
|
||||||
|
|
Loading…
Add table
Reference in a new issue