sensiolabs/SensioGeneratorBundle — pull request #307 by nykopol (2014-09-25 07:12:57+00:00)
Title: Enable the possibility to extends the twig environment

Q | A
------------ | -------------
Bug fix? | no
New feature? | yes
BC breaks? | no
Deprecations? | no
Fixed tickets | #208

This PR allow people who extends the generator for custom use to alter the twig environment.

For example, it will allow to add an extension :
```php
class MyGenerator extends Generator
{
protected function getTwigEnvironment(){
$twig = parent::getTwigEnvironment();
$twig->addExtension( new MyTwigExtension() );
return $twig;
}
}