public function Twig_Node_Expression_Array::addElement in Translation template extractor 6.3
Same name and namespace in other branches
- 7.3 vendor/Twig/Node/Expression/Array.php \Twig_Node_Expression_Array::addElement()
File
- vendor/
Twig/ Node/ Expression/ Array.php, line 54
Class
Code
public function addElement(Twig_Node_Expression $value, Twig_Node_Expression $key = null) {
if (null === $key) {
$key = new Twig_Node_Expression_Constant(++$this->index, $value
->getLine());
}
array_push($this->nodes, $key, $value);
}