1e88b35380
* 3.3: [FrameworkBundle] Set default public directory on install assets [Security] Fix wrong term in UserProviderInterface [HttpFoundation] Set meta refresh time to 0 in RedirectResponse content disable inlining deprecated services [Cache] add constructor docblocks for clarity [WebServerBundle] allowed public/ root directory to be auto-discovered along side web/ [WebServerBundle] remove duplicate code [SecurityBundle] Clarify deprecation in UserPasswordEncoderCommand::getContainer [Cache] add constructor docblocks for clarity [Security] validate empty passwords again [DI] Remove irrelevant comment from container [TwigBridge] cleaner implementation of the TwigRenderer
50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
<?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;
|
|
|
|
@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;
|
|
use Twig\Environment;
|
|
|
|
/**
|
|
* @author Bernhard Schussek <bschussek@gmail.com>
|
|
*
|
|
* @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}
|
|
*/
|
|
public function setEnvironment(Environment $environment)
|
|
{
|
|
$this->getEngine()->setEnvironment($environment);
|
|
}
|
|
}
|