extension
class extension extends AbstractExtension
Properties
protected context | $context | ||
protected environment | $environment | ||
protected language | $language |
Methods
Get the name of this extension
Returns the token parser instance to add to the existing list.
Returns a list of filters to add to the existing list.
Returns a list of global functions to add to the existing list.
Returns a list of operators to add to the existing list.
Grabs a subset of a loop
Get output for a language variable (L_FOO, LA_FOO)
Check if a language variable exists
Get output for language variable in JS code
Details
at line 36
__construct(context $context, environment $environment, language $language)
Constructor
at line 48
string
getName()
Get the name of this extension
at line 58
array
getTokenParsers()
Returns the token parser instance to add to the existing list.
at line 76
array
getFilters()
Returns a list of filters to add to the existing list.
at line 92
array
getFunctions()
Returns a list of global functions to add to the existing list.
at line 107
array
getOperators()
Returns a list of operators to add to the existing list.
at line 150
mixed
loop_subset(Environment $env, mixed $item, int $start, int $end = null, bool $preserveKeys = false)
Grabs a subset of a loop
at line 179
string
lang()
Get output for a language variable (L_FOO, LA_FOO)
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()
at line 202
bool
lang_defined($key)
Check if a language variable exists
at line 212
string
lang_js()
Get output for language variable in JS code