public function Twig_Node::hasAttribute

Returns true if the attribute is defined.

Parameters

string The attribute name:

Return value

Boolean true if the attribute is defined, false otherwise

File

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

Class

Twig_Node
Represents a node in the AST.

Code

public function hasAttribute($name) {
  return array_key_exists($name, $this->attributes);
}