Sets the CSRF field name used in all new CSRF protected forms
public static setDefaultCsrfFieldName ( string $name ) | ||
$name | string | The CSRF field name |
public function testDefaultCsrfFieldNameCanBeSet() { FormConfiguration::setDefaultCsrfFieldName('foobar'); $form = new Form('author', new Author(), $this->validator); $form->enableCsrfProtection(); $this->assertEquals('foobar', $form->getCsrfFieldName()); }