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

Breadcrumb

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

function Environment::addExtension

2 calls to Environment::addExtension()
Environment::__construct in vendor/twig/twig/src/Environment.php
Constructor.
TwigEnvironment::__construct in core/lib/Drupal/Core/Template/TwigEnvironment.php
Creates a TwigEnvironment object, including its cache and storage.

File

vendor/twig/twig/src/Environment.php, line 653

Class

Environment
Stores the Twig configuration and renders templates.

Namespace

Twig

Code

public function addExtension(ExtensionInterface $extension) {
    $this->extensionSet
        ->addExtension($extension);
    $this->updateOptionsHash();
}

API Navigation

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