Exemplo n.º 1
0
 public function __construct(TwigRendererEngineInterface $engine, $csrfTokenManager = null)
 {
     if ($csrfTokenManager instanceof CsrfProviderInterface) {
         $csrfTokenManager = new CsrfProviderAdapter($csrfTokenManager);
     } elseif (null !== $csrfTokenManager && !$csrfTokenManager instanceof CsrfTokenManagerInterface) {
         throw new UnexpectedTypeException($csrfTokenManager, 'CsrfProviderInterface or CsrfTokenManagerInterface');
     }
     parent::__construct($engine, $csrfTokenManager);
     $this->engine = $engine;
 }
 public function __construct(TwigRendererEngineInterface $engine, $csrfTokenManager = null)
 {
     parent::__construct($engine, $csrfTokenManager);
     $this->engine = $engine;
 }
Exemplo n.º 3
0
 /**
  * @param \NoiseLabs\Bundle\SmartyBundle\Form\SmartyRendererEngineInterface $engine
  * @param \Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface|null $csrfProvider
  */
 public function __construct(SmartyRendererEngineInterface $engine, CsrfProviderInterface $csrfProvider = null)
 {
     parent::__construct($engine, $csrfProvider);
     $this->engine = $engine;
 }