TwigNodeVisitor::doLeaveNode

protected TwigNodeVisitor::doLeaveNode(\Twig_Node $node, \Twig_Environment $env) Called after child nodes are visited. Parameters Twig_Node $node The node to visit: Twig_Environment $env The Twig environment instance: Return value Twig_Node|false The modified node or false if the node must be removed Overrides Twig_BaseNodeVisitor::doLeaveNode File core/lib/Drupal/Core/Template/TwigNodeVisitor.php, line 26 Class TwigNodeVisitor Provides a Twig_NodeVisitor to change the generated parse-tr

TwigNodeVisitor::doEnterNode

protected TwigNodeVisitor::doEnterNode(\Twig_Node $node, \Twig_Environment $env) Called before child nodes are visited. Parameters Twig_Node $node The node to visit: Twig_Environment $env The Twig environment instance: Return value Twig_Node The modified node Overrides Twig_BaseNodeVisitor::doEnterNode File core/lib/Drupal/Core/Template/TwigNodeVisitor.php, line 19 Class TwigNodeVisitor Provides a Twig_NodeVisitor to change the generated parse-tree. Namespace Drupal\Core\Template Cod

TwigNodeVisitor

Provides a Twig_NodeVisitor to change the generated parse-tree. This is used to ensure that everything printed is wrapped via the TwigExtension->renderVar() function in order to just write {{ content }} in templates instead of having to write {{ render_var(content) }}. Hierarchy class \Twig_BaseNodeVisitor implements \Twig_NodeVisitorInterface class \Drupal\Core\Template\TwigNodeVisitor See also twig_render File core/lib/Drupal/Core/Template/TwigNodeVisitor.php, line 14 Namespace Dr

TwigNodeTrans::__construct

public TwigNodeTrans::__construct(\Twig_Node $body, \Twig_Node $plural = NULL, \Twig_Node_Expression $count = NULL, \Twig_Node_Expression $options = NULL, $lineno, $tag = NULL) Constructor. The nodes are automatically made available as properties ($this->node). The attributes are automatically made available as array items ($this['name']). Parameters array $nodes An array of named nodes: array $attributes An array of attributes (should not be nodes): int $lineno The line number: string $tag

TwigNodeTrans::compileString

protected TwigNodeTrans::compileString(\Twig_Node $body) Extracts the text and tokens for the "trans" tag. Parameters \Twig_Node $body: The node to compile. Return value array Returns an array containing the two following parameters: string $text The extracted text. array $tokens The extracted tokens as new \Twig_Node_Expression_Name instances. File core/lib/Drupal/Core/Template/TwigNodeTrans.php, line 96 Class TwigNodeTrans A class that defines the Twig 'trans' tag for Drupal. Names

TwigNodeTrans::compile

public TwigNodeTrans::compile(\Twig_Compiler $compiler) Overrides Twig_Node::compile File core/lib/Drupal/Core/Template/TwigNodeTrans.php, line 32 Class TwigNodeTrans A class that defines the Twig 'trans' tag for Drupal. Namespace Drupal\Core\Template Code public function compile(\Twig_Compiler $compiler) { $compiler->addDebugInfo($this); $options = $this->getNode('options'); list($singular, $tokens) = $this->compileString($this->getNode('body')); $plural = NULL;

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 class \Twig_Node implements \Twig_NodeInterface class \Drupal\Core\Template\TwigNodeTrans 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 Name

TwigExtensionPass::process

public TwigExtensionPass::process(ContainerBuilder $container) You can modify the container here before it is dumped to PHP code. Parameters ContainerBuilder $container: Overrides CompilerPassInterface::process File core/lib/Drupal/Core/DependencyInjection/Compiler/TwigExtensionPass.php, line 19 Class TwigExtensionPass Adds the twig_extension_hash parameter to the container. Namespace Drupal\Core\DependencyInjection\Compiler Code public function process(ContainerBuilder $container) {

TwigExtensionPass

Adds the twig_extension_hash parameter to the container. twig_extension_hash is a hash of all extension mtimes for Twig template invalidation. Hierarchy class \Drupal\Core\DependencyInjection\Compiler\TwigExtensionPass implements CompilerPassInterface File core/lib/Drupal/Core/DependencyInjection/Compiler/TwigExtensionPass.php, line 14 Namespace Drupal\Core\DependencyInjection\Compiler Members Name Modifiers Type Description TwigExtensionPass::process public function You

TwigExtension::__construct

public TwigExtension::__construct(RendererInterface $renderer) Constructs \Drupal\Core\Template\TwigExtension. Parameters \Drupal\Core\Render\RendererInterface $renderer: The renderer. File core/lib/Drupal/Core/Template/TwigExtension.php, line 62 Class TwigExtension A class providing Drupal Twig extensions. Namespace Drupal\Core\Template Code public function __construct(RendererInterface $renderer) { $this->renderer = $renderer; }