23 lines
537 B
PHP
23 lines
537 B
PHP
<?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;
|
|
}
|
|
}
|