You are here

public function Twig_Environment::removeExtension in Translation template extractor 6.3

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

Removes an extension by name.

This method is deprecated and you should not use it.

Parameters

string $name The extension name:

Deprecated

since 1.12 (to be removed in 2.0)

File

vendor/Twig/Environment.php, line 675

Class

Twig_Environment
Stores the Twig configuration.

Code

public function removeExtension($name) {
  if ($this->extensionInitialized) {
    throw new LogicException(sprintf('Unable to remove extension "%s" as extensions have already been initialized.', $name));
  }
  unset($this->extensions[$name]);
}