getDefaultCsrfFieldName() публичный статический Метод

Returns the default CSRF field name
public static getDefaultCsrfFieldName ( ) : string
Результат string The CSRF field name
Пример #1
0
 /**
  * Enables CSRF protection for this form.
  */
 public function enableCsrfProtection($csrfFieldName = null, $csrfSecret = null)
 {
     if (!$this->isCsrfProtected()) {
         if (null === $csrfFieldName) {
             $csrfFieldName = FormConfiguration::getDefaultCsrfFieldName();
         }
         if (null === $csrfSecret) {
             $csrfSecret = md5(__FILE__ . php_uname());
         }
         $field = new HiddenField($csrfFieldName, array('property_path' => null));
         $field->setData($this->generateCsrfToken($csrfSecret));
         $this->add($field);
         $this->csrfFieldName = $csrfFieldName;
         $this->csrfSecret = $csrfSecret;
     }
 }