protected function Twig_Environment::initGlobals

2 calls to Twig_Environment::initGlobals()
Twig_Environment::addGlobal in drupal/core/vendor/twig/twig/lib/Twig/Environment.php
Registers a Global.
Twig_Environment::getGlobals in drupal/core/vendor/twig/twig/lib/Twig/Environment.php
Gets the registered Globals.

File

drupal/core/vendor/twig/twig/lib/Twig/Environment.php, line 1098

Class

Twig_Environment
Stores the Twig configuration.

Code

protected function initGlobals() {
  $globals = array();
  foreach ($this->extensions as $extension) {
    $globals = array_merge($globals, $extension
      ->getGlobals());
  }
  return array_merge($globals, $this->staging
    ->getGlobals());
}