Symfony\Bridge\Twig\Extension\TranslationExtension
Provides integration of the Translation component with Twig.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class TranslationExtension
extends Twig_Extension
{
- // members
- private $translator;
- private $translationNodeVisitor;
- // methods
- public void __construct()
- public void getTranslator()
- public void getFilters()
- public array getTokenParsers()
- public void getNodeVisitors()
- public void getTranslationNodeVisitor()
- public void trans()
- public void transchoice()
- public string getName()
- // Inherited methods from Twig_Extension
- public void initRuntime()
- public array getTokenParsers()
- public array getNodeVisitors()
- public array getFilters()
- public array getTests()
- public array getFunctions()
- public array getOperators()
- public array getGlobals()
Hierarchy
Extends
Members
private
- $translationNodeVisitor
- $translator
Methods
public
- __construct()
- getFilters() — {@inheritdoc}
- getName() — Returns the name of the extension.
- getNodeVisitors() — {@inheritdoc}
- getTokenParsers() — Returns the token parser instance to add to the existing list.
- getTranslationNodeVisitor()
- getTranslator()
- trans()
- transchoice()
Inherited from Twig_Extension
public
- getFilters() — Returns a list of filters to add to the existing list.
- getFunctions() — Returns a list of functions to add to the existing list.
- getGlobals() — Returns a list of global variables to add to the existing list.
- getNodeVisitors() — Returns the node visitor instances to add to the existing list.
- getOperators() — Returns a list of operators to add to the existing list.
- getTests() — Returns a list of tests to add to the existing list.
- getTokenParsers() — Returns the token parser instances to add to the existing list.
- initRuntime() — Initializes the runtime environment.