Twig_Environment::hasExtension PHP Method

hasExtension() public method

public hasExtension ( $name )
    public function hasExtension($name)
    {
        return isset($this->extensions[$name]);
    }

Same methods

Twig_Environment::hasExtension ( string $name ) : boolean

Usage Example

Example #1
0
 /**
  * {@inheritDoc}
  */
 public function process($layoutSrc, Response $response, array $placeResponses)
 {
     if (!$this->twig->hasExtension('supraPage')) {
         throw new \UnexpectedValueException('Missing for Supra Page extension.');
     }
     $response->setContent($this->twig->render($layoutSrc, array('responses' => $placeResponses)));
 }
All Usage Examples Of Twig_Environment::hasExtension