Twig_Environment::removeExtension PHP Method

removeExtension() public method

public removeExtension ( $name )
    public function removeExtension($name)
    {
        unset($this->extensions[$name]);
    }

Same methods

Twig_Environment::removeExtension ( string $name )

Usage Example

Example #1
0
 /**
  * Get (init if necessary) twig environment
  *
  * @param boolean $reset Force re-initialization (helpful for UTs)
  *
  * @return \Twig_Environment
  */
 protected function getEnvironment($reset = false)
 {
     if ($reset === true || null === $this->twig) {
         $this->twig = new \Twig_Environment($this->getLoader(), $this->getConfig());
         $this->twig->removeExtension('escaper');
     }
     return $this->twig;
 }
All Usage Examples Of Twig_Environment::removeExtension