Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TemplateVariable.php

function TemplateVariable::getName

1 call to TemplateVariable::getName()
TemplateVariable::compile in vendor/twig/twig/src/Node/Expression/Variable/TemplateVariable.php

File

vendor/twig/twig/src/Node/Expression/Variable/TemplateVariable.php, line 19

Class

TemplateVariable

Namespace

Twig\Node\Expression\Variable

Code

public function getName(Compiler $compiler) : string {
    if (null === $this->getAttribute('name')) {
        $this->setAttribute('name', $compiler->getVarName());
    }
    return $this->getAttribute('name');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal