Symfony\Component\Form\FormConfiguration::disableDefaultCsrfProtection PHP 메소드

disableDefaultCsrfProtection() 공개 정적인 메소드

Disables Csrf protection for all forms.
public static disableDefaultCsrfProtection ( )
    static public function disableDefaultCsrfProtection()
    {
        self::$defaultCsrfProtection = false;
    }

Usage Example

예제 #1
0
파일: FormTest.php 프로젝트: spf13/symfony
 protected function setUp()
 {
     FormConfiguration::disableDefaultCsrfProtection();
     FormConfiguration::setDefaultCsrfSecret(null);
     $this->validator = $this->createMockValidator();
     $this->form = new Form('author', new Author(), $this->validator);
 }