Passing Arguments into Symfony 3 Form configureOptions
<p>I have the following form:</p>

<pre><code>class TestFormType extends AbstractType
{
    protected $testArgument;

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        if (isset($options['testArgument'])) {
            $this-&gt;testArgument = $options['testArgument'];
        }

        $builder-&gt;add('textField', 'Symfony\Component\Form\Extension\Core\Type\TextType');
    }

    public function configureOptions(OptionsResolver $optionsResolver)
    {
        $optionsResolver-&gt;setRequired('testArgument');

        $optionsResolver-&gt;setDefaults(
            array(
                'data_class' =&gt; get_class($this-&gt;testArgument)
            )
        );
    }
}
</code></pre>

<p>I am passing the value for the <code>testArgument</code> attribute via form options (Symfony 3 modifications), but when is comes to get the class name of the attribute to set the <code>'data_class'</code> inside <code>configureOptions</code> method, it is always <code>null</code>. Basically I need to depend on the form type class attribute inside the <code>configureOptions</code> method.Can someone please help me out here to the right direction ?</p>