StimulusTwigExtension
extends AbstractExtension
in package
Tags
Table of Contents
Methods
- appendStimulusAction() : StimulusActionsDto
- appendStimulusController() : StimulusControllersDto
- appendStimulusTarget() : StimulusTargetsDto
- getFilters() : array<string|int, TwigFilter>
- Returns a list of filters to add to the existing list.
- getFunctions() : array<string|int, TwigFunction>
- Returns a list of functions to add to the existing list.
- getNodeVisitors() : array<string|int, NodeVisitorInterface>
- Returns the node visitor instances to add to the existing list.
- getOperators() : array<string|int, array<string|int, mixed>>
- Returns a list of operators to add to the existing list.
- getTests() : array<string|int, TwigTest>
- Returns a list of tests to add to the existing list.
- getTokenParsers() : array<string|int, TokenParserInterface>
- Returns the token parser instances to add to the existing list.
- renderStimulusAction() : StimulusActionsDto
- renderStimulusController() : StimulusControllersDto
- renderStimulusTarget() : StimulusTargetsDto
Methods
appendStimulusAction()
public
appendStimulusAction(StimulusActionsDto $dto, string $controllerName, string $actionName[, string $eventName = null ][, array<string|int, mixed> $parameters = [] ]) : StimulusActionsDto
Parameters
- $dto : StimulusActionsDto
- $controllerName : string
- $actionName : string
- $eventName : string = null
- $parameters : array<string|int, mixed> = []
-
Parameters to pass to the action. Optional.
Return values
StimulusActionsDtoappendStimulusController()
public
appendStimulusController(StimulusControllersDto $dto, string $controllerName[, array<string|int, mixed> $controllerValues = [] ][, array<string|int, mixed> $controllerClasses = [] ]) : StimulusControllersDto
Parameters
- $dto : StimulusControllersDto
- $controllerName : string
- $controllerValues : array<string|int, mixed> = []
- $controllerClasses : array<string|int, mixed> = []
Return values
StimulusControllersDtoappendStimulusTarget()
public
appendStimulusTarget(StimulusTargetsDto $dto, string $controllerName[, string|null $targetNames = null ]) : StimulusTargetsDto
Parameters
- $dto : StimulusTargetsDto
- $controllerName : string
-
the Stimulus controller name
- $targetNames : string|null = null
-
The space-separated list of target names if a string is passed to the 1st argument. Optional.
Return values
StimulusTargetsDtogetFilters()
Returns a list of filters to add to the existing list.
public
getFilters() : array<string|int, TwigFilter>
Return values
array<string|int, TwigFilter>getFunctions()
Returns a list of functions to add to the existing list.
public
getFunctions() : array<string|int, TwigFunction>
Return values
array<string|int, TwigFunction>getNodeVisitors()
Returns the node visitor instances to add to the existing list.
public
getNodeVisitors() : array<string|int, NodeVisitorInterface>
Return values
array<string|int, NodeVisitorInterface>getOperators()
Returns a list of operators to add to the existing list.
public
getOperators() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>> —First array of unary operators, second array of binary operators
getTests()
Returns a list of tests to add to the existing list.
public
getTests() : array<string|int, TwigTest>
Return values
array<string|int, TwigTest>getTokenParsers()
Returns the token parser instances to add to the existing list.
public
getTokenParsers() : array<string|int, TokenParserInterface>
Return values
array<string|int, TokenParserInterface>renderStimulusAction()
public
renderStimulusAction(Environment $env, mixed $controllerName[, string $actionName = null ][, string $eventName = null ][, array<string|int, mixed> $parameters = [] ]) : StimulusActionsDto
Parameters
- $env : Environment
- $controllerName : mixed
- $actionName : string = null
- $eventName : string = null
- $parameters : array<string|int, mixed> = []
-
Parameters to pass to the action. Optional.
Return values
StimulusActionsDtorenderStimulusController()
public
renderStimulusController(Environment $env, string $controllerName[, array<string|int, mixed> $controllerValues = [] ][, array<string|int, mixed> $controllerClasses = [] ]) : StimulusControllersDto
Parameters
- $env : Environment
- $controllerName : string
-
the Stimulus controller name
- $controllerValues : array<string|int, mixed> = []
-
array of controller values
- $controllerClasses : array<string|int, mixed> = []
-
array of controller CSS classes
Return values
StimulusControllersDtorenderStimulusTarget()
public
renderStimulusTarget(Environment $env, string $controllerName[, string|null $targetNames = null ]) : StimulusTargetsDto
Parameters
- $env : Environment
- $controllerName : string
-
the Stimulus controller name
- $targetNames : string|null = null
-
The space-separated list of target names if a string is passed to the 1st argument. Optional.