public function Twig_Node::hasNode

Returns true if the node with the given identifier exists.

Parameters

string The node name:

Return value

Boolean true if the node with the given name exists, false otherwise

1 call to Twig_Node::hasNode()
Twig_Node_If::compile in drupal/core/vendor/twig/twig/lib/Twig/Node/If.php
Compiles the node to PHP.

File

drupal/core/vendor/twig/twig/lib/Twig/Node.php, line 176

Class

Twig_Node
Represents a node in the AST.

Code

public function hasNode($name) {
  return array_key_exists($name, $this->nodes);
}