/** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { /* We need to set it to disabled, so Symfony ignores the fact that there is no data submitted back for this field (mapping=>false is only two way, so not usable) */ if (isset($options['static_control']) && $options['static_control']) { $builder->setDisabled(true); } }
/** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->setDisabled($options['disabled']); $builder->setAutoInitialize($options['auto_initialize']); }
/** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->setDisabled($options['disabled']); }