8000 [Form] adding field does not properly autocompletes some properties · Issue #786 · Haehnchen/idea-php-symfony2-plugin · GitHub
[go: up one dir, main page]

Skip to content
[Form] adding field does not properly autocompletes some properties #786
@Koc

Description

@Koc

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,
            )
        );
    }
}

2016-09-03_13-03-11

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0