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

Breadcrumb

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

function Parser::getImportedSymbol

File

vendor/twig/twig/src/Parser.php, line 310

Class

Parser
@author Fabien Potencier <fabien@symfony.com>

Namespace

Twig

Code

public function getImportedSymbol(string $type, string $alias) {
    // if the symbol does not exist in the current scope (0), try in the main/global scope (last index)
    return $this->importedSymbols[0][$type][$alias] ?? $this->importedSymbols[\count($this->importedSymbols) - 1][$type][$alias] ?? null;
}
RSS feed
Powered by Drupal