-
-
Notifications
You must be signed in to change notification settings - Fork 141
Closed
Labels
Description
There is Company
class with protected property $uploadedLogo
. I've create form for it
class CompanySaveLogoType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add(
'<autocomplete>',
'file',
array(
'required' => !$options['data']->getLogo(),
)
);
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(
array(
'data_class' => Company::class,
)
);
}
}
As you see from screenshot there are some autocompletes: two fields - ok, method updated
- looks strange and uploaded_logo
- it correctly discovers method, but why in underscore? Property is uploadedLogo
.