\Twig_SimpleFilter

Represents a template filter.

Summary

Methods
Properties
Constants
__construct()
getName()
getCallable()
getNodeClass()
setArguments()
getArguments()
needsEnvironment()
needsContext()
getSafe()
getPreservesSafety()
getPreEscape()
isVariadic()
isDeprecated()
getDeprecatedVersion()
getAlternative()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$name
$callable
$options
$arguments
N/A

Properties

$name

$name : 

Type

$callable

$callable : 

Type

$options

$options : 

Type

$arguments

$arguments : 

Type

Methods

__construct()

__construct(string  $name, callable|null  $callable = null, array  $options = array()) 

Creates a template filter.

Parameters

string $name

Name of this filter

callable|null $callable

A callable implementing the filter. If null, you need to overwrite the "node_class" option to customize compilation.

array $options

Options array

getName()

getName() 

getCallable()

getCallable() : callable|null

Returns the callable to execute for this filter.

Returns

callable|null

getNodeClass()

getNodeClass() 

setArguments()

setArguments(  $arguments) 

Parameters

$arguments

getArguments()

getArguments() 

needsEnvironment()

needsEnvironment() 

needsContext()

needsContext() 

getSafe()

getSafe(\Twig_Node  $filterArgs) 

Parameters

\Twig_Node $filterArgs

getPreservesSafety()

getPreservesSafety() 

getPreEscape()

getPreEscape() 

isVariadic()

isVariadic() 

isDeprecated()

isDeprecated() 

getDeprecatedVersion()

getDeprecatedVersion() 

getAlternative()

getAlternative()