mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 12:03:21 +01:00
[feature/twig] Indentation and comments
PHPBB3-11598
This commit is contained in:
parent
5c39f26cd2
commit
84e0943c7b
@ -59,9 +59,9 @@ class phpbb_template_twig_extension extends Twig_Extension
|
||||
*/
|
||||
public function getFilters()
|
||||
{
|
||||
return array(
|
||||
new Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)),
|
||||
new Twig_SimpleFilter('addslashes', 'addslashes'),
|
||||
return array(
|
||||
new Twig_SimpleFilter('subset', array($this, 'loop_subset'), array('needs_environment' => true)),
|
||||
new Twig_SimpleFilter('addslashes', 'addslashes'),
|
||||
);
|
||||
}
|
||||
|
||||
@ -72,8 +72,8 @@ class phpbb_template_twig_extension extends Twig_Extension
|
||||
*/
|
||||
public function getFunctions()
|
||||
{
|
||||
return array(
|
||||
new Twig_SimpleFunction('lang', array($this, 'lang')),
|
||||
return array(
|
||||
new Twig_SimpleFunction('lang', array($this, 'lang')),
|
||||
);
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ class phpbb_template_twig_extension extends Twig_Extension
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
'!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),
|
||||
'!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),
|
||||
),
|
||||
array(
|
||||
// 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),
|
||||
'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),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -102,7 +102,9 @@ class phpbb_template_twig implements phpbb_template
|
||||
* Constructor.
|
||||
*
|
||||
* @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_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
|
||||
|
Loading…
x
Reference in New Issue
Block a user