TwigExtensionInterface
interface TwigExtensionInterface
Interface TwigExtensionInterface.
Methods
No description
Sets the options that tells Twig it should inject the Twig_Enviornment into the function call.
Sets the option that allows for HTML to be returned from the extension function.
Returns the name of the Twig extension based on the classname.
Clears the array of extension functions.
Returns an array of extension functions as {@see:\Twig_Function}.
Adds an array of extension functions.
Add functions to extension.
Clears the array of extension filters.
Returns an array of extension filters as {@see:\Twig_Filters}.
Adds an array of extension filters.
Add filter to extension.
Details
at line line 26
TwigOptionsDefinition
getOptions()
at line line 33
$this
setOptions(
TwigOptionsDefinition $options)
at line line 42
$this
addOptionNeedsEnvironment(
bool $enable = true)
Sets the options that tells Twig it should inject the Twig_Enviornment into the function call.
at line line 51
$this
addOptionHtmlSafe(
bool $enable = true)
Sets the option that allows for HTML to be returned from the extension function.
at line line 58
string
getName()
Returns the name of the Twig extension based on the classname.
at line line 65
$this
clearFunctions()
Clears the array of extension functions.
at line line 72
Twig_Function[]
getFunctions()
Returns an array of extension functions as {@see:\Twig_Function}.
at line line 81
$this
addFunctions(
array $functions = array())
Adds an array of extension functions.
at line line 92
$this
addFunction(
string $name,
callable $callable,
TwigOptionsDefinition $options = null)
Add functions to extension.
at line line 99
$this
clearFilters()
Clears the array of extension filters.
at line line 106
Twig_Filter[]
getFilters()
Returns an array of extension filters as {@see:\Twig_Filters}.
at line line 115
$this
addFilters(
array $filters = array())
Adds an array of extension filters.
at line line 126
$this
addFilter(
string $name,
callable $callable,
TwigOptionsDefinition $options = null)
Add filter to extension.