TranslationExtension
extends AbstractExtension
in package
Provides integration of the Translation component with Twig.
Tags
Table of Contents
- $translationNodeVisitor : mixed
- $translator : mixed
- __construct() : mixed
- 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.
- getName() : mixed
- {@inheritdoc}
- 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, AbstractTokenParser>
- Returns the token parser instance to add to the existing list.
- getTranslationNodeVisitor() : mixed
- getTranslator() : TranslatorInterface|null
- trans() : mixed
- transchoice() : mixed
Properties
$translationNodeVisitor
private
mixed
$translationNodeVisitor
$translator
private
mixed
$translator
Methods
__construct()
public
__construct([TranslatorInterface|null $translator = null ][, NodeVisitorInterface $translationNodeVisitor = null ]) : mixed
Parameters
- $translator : TranslatorInterface|null = null
- $translationNodeVisitor : NodeVisitorInterface = null
Return values
mixed —getFilters()
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> —getName()
{@inheritdoc}
public
getName() : mixed
Return values
mixed —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 instance to add to the existing list.
public
getTokenParsers() : array<string|int, AbstractTokenParser>
Return values
array<string|int, AbstractTokenParser> —getTranslationNodeVisitor()
public
getTranslationNodeVisitor() : mixed
Return values
mixed —getTranslator()
public
getTranslator() : TranslatorInterface|null
Return values
TranslatorInterface|null —trans()
public
trans(mixed $message[, array<string|int, mixed> $arguments = [] ][, mixed $domain = null ][, mixed $locale = null ][, mixed $count = null ]) : mixed
Parameters
- $message : mixed
- $arguments : array<string|int, mixed> = []
- $domain : mixed = null
- $locale : mixed = null
- $count : mixed = null
Return values
mixed —transchoice()
public
transchoice(mixed $message, mixed $count[, array<string|int, mixed> $arguments = [] ][, mixed $domain = null ][, mixed $locale = null ]) : mixed
Parameters
- $message : mixed
- $count : mixed
- $arguments : array<string|int, mixed> = []
- $domain : mixed = null
- $locale : mixed = null