]> git.immae.eu Git - github/wallabag/wallabag.git/blob - vendor/symfony/twig-bridge/Symfony/Bridge/Twig/Form/TwigRenderer.php
72798d103fa1fa69f90b50a38daf9e9f7412ecd7
[github/wallabag/wallabag.git] / vendor / symfony / twig-bridge / Symfony / Bridge / Twig / Form / TwigRenderer.php
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Bridge\Twig\Form;
13
14 use Symfony\Component\Form\FormRenderer;
15 use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface;
16
17 /**
18 * @author Bernhard Schussek <bschussek@gmail.com>
19 */
20 class TwigRenderer extends FormRenderer implements TwigRendererInterface
21 {
22 /**
23 * @var TwigRendererEngineInterface
24 */
25 private $engine;
26
27 public function __construct(TwigRendererEngineInterface $engine, CsrfProviderInterface $csrfProvider = null)
28 {
29 parent::__construct($engine, $csrfProvider);
30
31 $this->engine = $engine;
32 }
33
34 /**
35 * {@inheritdoc}
36 */
37 public function setEnvironment(\Twig_Environment $environment)
38 {
39 $this->engine->setEnvironment($environment);
40 }
41 }