resume/tests/Silex/Tests/Provider/FormServiceProviderTest/DisableCsrfExtension.php

23 lines
537 B
PHP
Raw Normal View History

2016-07-02 10:58:30 -07:00
<?php
namespace Silex\Tests\Provider\FormServiceProviderTest;
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\OptionsResolver\OptionsResolver;
class DisableCsrfExtension extends AbstractTypeExtension
{
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'csrf_protection' => false,
));
}
public function getExtendedType()
{
return FormType::class;
}
}