Form/Type/AbstractType.php
public function configureOptions(OptionsResolver $resolver)
    {
        $defaults = [
            'csrf_protection' => $this->csrfProtection,
        ];

        if ($this->csrfProtection) {
            $defaults['csrf_field_name'] = $this->csrfFieldName;
            $defaults['intention'] = $this->getDefaultIntention();
        }

        if ($this->dataClass) {
            $defaults['data_class'] = $this->dataClass;
        }

        $resolver->setDefaults($defaults);
    }
public function configureOptions(OptionsResolver $resolver)
    {
        $defaults = [
            'csrf_protection' => $this->csrfProtection,
        ];

        if ($this->csrfProtection) {
            $defaults['csrf_field_name'] = $this->csrfFieldName;
            $defaults['intention'] = $this->getDefaultIntention();
        }

        if ($this->dataClass) {
            $defaults['data_class'] = $this->dataClass;
        }

        $resolver->setDefaults($defaults);
    }
{@inheritdoc}