public function TwigReference::__construct

Constructs a \Drupal\Core\Template\TwigReference object.

The argument to the constructor is ignored as it is not safe that this will always be a reference.

To set a reference use:

$obj = new TwigReference();
$obj
  ->setReference($variable);

Parameters

$array: The array parameter is ignored and not passed to the parent

File

drupal/core/lib/Drupal/Core/Template/TwigReference.php, line 60
Definition of Drupal\Core\Template\TwigReference.

Class

TwigReference
A class used to pass variables by reference while they are used in twig.

Namespace

Drupal\Core\Template

Code

public function __construct($array = NULL) {
  parent::__construct();
}