You are here

public function Twig_Environment::getGlobals in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Twig/Environment.php \Twig_Environment::getGlobals()

Gets the registered Globals.

Return value

array An array of globals

1 call to Twig_Environment::getGlobals()
Twig_Environment::mergeGlobals in vendor/Twig/Environment.php
Merges a context with the defined globals.

File

vendor/Twig/Environment.php, line 1053

Class

Twig_Environment
Stores the Twig configuration.

Code

public function getGlobals() {
  if (!$this->runtimeInitialized && !$this->extensionInitialized) {
    return $this
      ->initGlobals();
  }
  if (null === $this->globals) {
    $this->globals = $this
      ->initGlobals();
  }
  return $this->globals;
}