This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bridge/Twig/Form/TwigRenderer.php

50 lines
1.4 KiB
PHP
Raw Normal View History

<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bridge\Twig\Form;
2017-07-06 14:19:41 +01:00
@trigger_error(sprintf('The %s class is deprecated since version 3.4 and will be removed in 4.0. Use %s instead.', TwigRenderer::class, FormRenderer::class), E_USER_DEPRECATED);
use Symfony\Component\Form\FormRenderer;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
2017-05-30 11:15:38 +01:00
use Twig\Environment;
/**
* @author Bernhard Schussek <bschussek@gmail.com>
2017-07-06 14:19:41 +01:00
*
* @deprecated since version 3.4, to be removed in 4.0. Use Symfony\Component\Form\FormRenderer instead.
*/
class TwigRenderer extends FormRenderer implements TwigRendererInterface
{
public function __construct(TwigRendererEngineInterface $engine, CsrfTokenManagerInterface $csrfTokenManager = null)
{
parent::__construct($engine, $csrfTokenManager);
}
/**
* Returns the engine used by this renderer.
*
* @return TwigRendererEngineInterface The renderer engine
*/
public function getEngine()
{
return parent::getEngine();
}
/**
* {@inheritdoc}
*/
2017-05-30 11:15:38 +01:00
public function setEnvironment(Environment $environment)
{
$this->getEngine()->setEnvironment($environment);
}
}