Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TwigNodeTrans.php

function TwigNodeTrans::__construct

Overrides Node::__construct

File

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

Class

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

Namespace

Drupal\Core\Template

Code

public function __construct(Node $body, ?Node $plural = NULL, ?AbstractExpression $count = NULL, ?AbstractExpression $options = NULL, $lineno = 0) {
    $nodes['body'] = $body;
    if ($count !== NULL) {
        $nodes['count'] = $count;
    }
    if ($plural !== NULL) {
        $nodes['plural'] = $plural;
    }
    if ($options !== NULL) {
        $nodes['options'] = $options;
    }
    parent::__construct($nodes, [], $lineno);
}
RSS feed
Powered by Drupal