public function Twig_Node::getAttribute

Gets an attribute.

Parameters

string The attribute name:

Return value

mixed The attribute value

23 calls to Twig_Node::getAttribute()
Twig_Node_BlockReference::compile in drupal/core/vendor/twig/twig/lib/Twig/Node/BlockReference.php
Compiles the node to PHP.
Twig_Node_Expression_BlockReference::compile in drupal/core/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php
Compiles the node to PHP.
Twig_Node_Expression_Call::compileArguments in drupal/core/vendor/twig/twig/lib/Twig/Node/Expression/Call.php
Twig_Node_Expression_Call::compileCallable 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

... See full list

File

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

Class

Twig_Node
Represents a node in the AST.

Code

public function getAttribute($name) {
  if (!array_key_exists($name, $this->attributes)) {
    throw new LogicException(sprintf('Attribute "%s" does not exist for Node "%s".', $name, get_class($this)));
  }
  return $this->attributes[$name];
}