1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-02 14:57:37 +02:00

[feature/twig] Indentation and comments

PHPBB3-11598
This commit is contained in:
Nathaniel Guse
2013-07-04 10:22:12 -05:00
parent 5c39f26cd2
commit 84e0943c7b
2 changed files with 12 additions and 10 deletions

View File

@@ -59,9 +59,9 @@ class phpbb_template_twig_extension extends Twig_Extension
*/ */
public function getFilters() public function getFilters()
{ {
return array( return array(
new Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)), new Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)),
new Twig_SimpleFilter('addslashes', 'addslashes'), new Twig_SimpleFilter('addslashes', 'addslashes'),
); );
} }
@@ -72,8 +72,8 @@ class phpbb_template_twig_extension extends Twig_Extension
*/ */
public function getFunctions() public function getFunctions()
{ {
return array( return array(
new Twig_SimpleFunction('lang', array($this, 'lang')), new Twig_SimpleFunction('lang', array($this, 'lang')),
); );
} }
@@ -86,7 +86,7 @@ class phpbb_template_twig_extension extends Twig_Extension
{ {
return array( return array(
array( array(
'!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'), '!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),
), ),
array( array(
// precedence settings are copied from similar operators in Twig core extension // precedence settings are copied from similar operators in Twig core extension
@@ -109,9 +109,9 @@ class phpbb_template_twig_extension extends Twig_Extension
'lte' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), 'lte' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
'le' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), 'le' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
'mod' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), 'mod' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
), ),
); );
} }
/** /**

View File

@@ -102,7 +102,9 @@ class phpbb_template_twig implements phpbb_template
* Constructor. * Constructor.
* *
* @param string $phpbb_root_path phpBB root path * @param string $phpbb_root_path phpBB root path
* @param user $user current user * @param string $php_ext php extension (typically 'php')
* @param phpbb_config $config
* @param phpbb_user $user
* @param phpbb_template_context $context template context * @param phpbb_template_context $context template context
* @param phpbb_extension_manager $extension_manager extension manager, if null then template events will not be invoked * @param phpbb_extension_manager $extension_manager extension manager, if null then template events will not be invoked
* @param string $adm_relative_path relative path to adm directory * @param string $adm_relative_path relative path to adm directory