diff options
author | Andreas Fischer <bantu@phpbb.com> | 2013-07-24 02:45:35 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2013-07-24 02:45:35 +0200 |
commit | f0516b7d2a0ac0e1fbf6832cfcfde119ad508907 (patch) | |
tree | 362bd27fad2e1fe08e6649b27b3ab4baa247fee6 /phpBB/phpbb | |
parent | 7d8e80241c43fa7d0ade4afa2f56d7eb1aa32989 (diff) | |
parent | bf04bfcced7934704e7f2682ee608f490cb3fc76 (diff) | |
download | forums-f0516b7d2a0ac0e1fbf6832cfcfde119ad508907.tar forums-f0516b7d2a0ac0e1fbf6832cfcfde119ad508907.tar.gz forums-f0516b7d2a0ac0e1fbf6832cfcfde119ad508907.tar.bz2 forums-f0516b7d2a0ac0e1fbf6832cfcfde119ad508907.tar.xz forums-f0516b7d2a0ac0e1fbf6832cfcfde119ad508907.zip |
Merge remote-tracking branch 'EXreaction/ticket/11667' into develop
* EXreaction/ticket/11667:
[ticket/11667] Use @inheritdoc
[ticket/11734] Readd accidently removed language strings of forum permissions
[ticket/11667] Make functions abstract in includeasset
[ticket/11667] includeasset should be abstract
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/template/twig/node/includeasset.php | 17 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/node/includecss.php | 9 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/node/includejs.php | 9 |
3 files changed, 26 insertions, 9 deletions
diff --git a/phpBB/phpbb/template/twig/node/includeasset.php b/phpBB/phpbb/template/twig/node/includeasset.php index 990b1c984f..1cab416c79 100644 --- a/phpBB/phpbb/template/twig/node/includeasset.php +++ b/phpBB/phpbb/template/twig/node/includeasset.php @@ -7,7 +7,7 @@ * */ -class phpbb_template_twig_node_includeasset extends Twig_Node +abstract class phpbb_template_twig_node_includeasset extends Twig_Node { /** @var Twig_Environment */ protected $environment; @@ -57,4 +57,19 @@ class phpbb_template_twig_node_includeasset extends Twig_Node ->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); } diff --git a/phpBB/phpbb/template/twig/node/includecss.php b/phpBB/phpbb/template/twig/node/includecss.php index 01fda44aad..a9d9b46d69 100644 --- a/phpBB/phpbb/template/twig/node/includecss.php +++ b/phpBB/phpbb/template/twig/node/includecss.php @@ -9,16 +9,17 @@ class phpbb_template_twig_node_includecss extends phpbb_template_twig_node_includeasset { + /** + * {@inheritdoc} + */ public function get_definition_name() { return 'STYLESHEETS'; } /** - * Compiles the node to PHP. - * - * @param Twig_Compiler A Twig_Compiler instance - */ + * {@inheritdoc} + */ public function append_asset(Twig_Compiler $compiler) { $compiler diff --git a/phpBB/phpbb/template/twig/node/includejs.php b/phpBB/phpbb/template/twig/node/includejs.php index fdf2bea3ed..2b4b55fb0a 100644 --- a/phpBB/phpbb/template/twig/node/includejs.php +++ b/phpBB/phpbb/template/twig/node/includejs.php @@ -9,16 +9,17 @@ class phpbb_template_twig_node_includejs extends phpbb_template_twig_node_includeasset { + /** + * {@inheritdoc} + */ public function get_definition_name() { return 'SCRIPTS'; } /** - * Compiles the node to PHP. - * - * @param Twig_Compiler A Twig_Compiler instance - */ + * {@inheritdoc} + */ protected function append_asset(Twig_Compiler $compiler) { $config = $this->environment->get_phpbb_config(); |