class TwigNodeTrans

A class that defines the Twig 'trans' tag for Drupal.

This Twig extension was originally based on Twig i18n extension. It has been severely modified to work properly with the complexities of the Drupal translation system.

Hierarchy

See also

http://twig.sensiolabs.org/doc/extensions/i18n.html

https://github.com/fabpot/Twig-extensions

File

core/lib/Drupal/Core/Template/TwigNodeTrans.php, line 15

Namespace

Drupal\Core\Template

Members

Name Modifiers Type Description
TwigNodeTrans::compile public function Overrides Twig_Node::compile
TwigNodeTrans::compileString protected function Extracts the text and tokens for the "trans" tag.
TwigNodeTrans::__construct public function Constructor. Overrides Twig_Node::__construct
Twig_Node::$attributes protected property
Twig_Node::$lineno protected property
Twig_Node::$nodes protected property
Twig_Node::$tag protected property
Twig_Node::count public function
Twig_Node::getAttribute public function Gets an attribute value by name.
Twig_Node::getIterator public function
Twig_Node::getLine public function
Twig_Node::getNode public function Gets a node by name.
Twig_Node::getNodeTag public function
Twig_Node::hasAttribute public function Returns true if the attribute is defined.
Twig_Node::hasNode public function Returns true if the node with the given name exists.
Twig_Node::removeAttribute public function Removes an attribute by name.
Twig_Node::removeNode public function Removes a node by name.
Twig_Node::setAttribute public function Sets an attribute by name to a value.
Twig_Node::setNode public function Sets a node.
Twig_Node::toXml Deprecated public function
Twig_Node::__toString public function

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Template!TwigNodeTrans.php/class/TwigNodeTrans/8.1.x