TranslationExtension

class TranslationExtension extends Twig_Extension

Provides integration of the Translation component with Twig.

Methods

__construct(TranslatorInterface $translator, Twig_NodeVisitorInterface $translationNodeVisitor = null)
getTranslator()
getFilters()

{@inheritdoc}

array getTokenParsers()

Returns the token parser instance to add to the existing list.

getNodeVisitors()

{@inheritdoc}

getTranslationNodeVisitor()
trans($message, array $arguments = array(), $domain = null, $locale = null)
transchoice($message, $count, array $arguments = array(), $domain = null, $locale = null)
getName()

{@inheritdoc}

Details

__construct(TranslatorInterface $translator, Twig_NodeVisitorInterface $translationNodeVisitor = null)

Parameters

TranslatorInterface $translator
Twig_NodeVisitorInterface $translationNodeVisitor

getTranslator()

getFilters()

{@inheritdoc}

array getTokenParsers()

Returns the token parser instance to add to the existing list.

Return Value

array An array of Twig_TokenParser instances

getNodeVisitors()

{@inheritdoc}

getTranslationNodeVisitor()

trans($message, array $arguments = array(), $domain = null, $locale = null)

Parameters

$message
array $arguments
$domain
$locale

transchoice($message, $count, array $arguments = array(), $domain = null, $locale = null)

Parameters

$message
$count
array $arguments
$domain
$locale

getName()

{@inheritdoc}

doc_Symfony
2016-10-28 06:35:11
Comments
Leave a Comment

Please login to continue.