class extension extends Twig_Extension
Methods
extension |
__construct(context $context, language $language)
Constructor |
|
string |
getName()
Get the name of this extension |
|
array |
getTokenParsers()
Returns the token parser instance to add to the existing list. |
|
array |
getFilters()
Returns a list of filters to add to the existing list. |
|
array |
getFunctions()
Returns a list of global functions to add to the existing list. |
|
array |
getOperators()
Returns a list of operators to add to the existing list. |
|
mixed |
loop_subset(Twig_Environment $env, mixed $item, integer $start, integer $end = null, Boolean $preserveKeys = false)
Grabs a subset of a loop |
|
string |
lang()
Get output for a language variable (LFOO, LAFOO) |
Details
at line 31
public extension
__construct(context $context, language $language)
Constructor
at line 42
public string
getName()
Get the name of this extension
at line 52
public array
getTokenParsers()
Returns the token parser instance to add to the existing list.
at line 70
public array
getFilters()
Returns a list of filters to add to the existing list.
at line 84
public array
getFunctions()
Returns a list of global functions to add to the existing list.
at line 96
public array
getOperators()
Returns a list of operators to add to the existing list.
at line 139
public mixed
loop_subset(Twig_Environment $env, mixed $item, integer $start, integer $end = null, Boolean $preserveKeys = false)
Grabs a subset of a loop
at line 168
public string
lang()
Get output for a language variable (LFOO, LAFOO)
This function checks to see if the language var was outputted to $context (e.g. in the ACP, L_TITLE) If not, we return the result of $user->lang()