i5bf3a
Last Updated: February 25, 2016
·
1.413K
· jverdeyen

Symfony2 Forms: Disable all fields

use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class XAdminType extends ..

public function setDefaultOptions(OptionsResolverInterface $resolver)
{
    $resolver->setDefaults(array(
        'disabled' => true,
    ));
}