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

2 calls to Twig_Node::hasAttribute()
Twig_Node_Expression_Call::compileArguments in drupal/core/vendor/twig/twig/lib/Twig/Node/Expression/Call.php
Twig_Node_Expression_Call::getArguments in drupal/core/vendor/twig/twig/lib/Twig/Node/Expression/Call.php

File

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

Class

Twig_Node
Represents a node in the AST.

Code

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