Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocompletion for options in the form type #162

Closed
stof opened this issue Sep 30, 2013 · 6 comments
Closed

Autocompletion for options in the form type #162

stof opened this issue Sep 30, 2013 · 6 comments

Comments

@stof
Copy link
Contributor

stof commented Sep 30, 2013

When writing a form type, it would be great to have autocompletion for keys of $options in the different methods where it is available.

These key should take into account the configuration of the form type itself (by looking at the code of its setDefaultOptions method and of all of its parent in the hierarchy (getParent and recursively, plus all form extensions applied at any level).
Thus, it is even possible to provide autocompletion for the type of the values in case addAllowedTypes or setAllowedTypes are used for some options: http://symfony.com/doc/current/components/options_resolver.html#configure-allowed-types

@Haehnchen
Copy link
Owner

http://symfony2-plugin.espend.de/languages/php/index.html#forms
we already have key completion for extension, type and parent lookup:

Symfony\Component\OptionsResolver\OptionsResolverInterface::setDefaults
Symfony\Component\Form\FormTypeInterface::setDefaultOptions
Symfony\Component\Form\FormTypeInterface::buildForm
Symfony\Component\Form\FormBuilderInterface::add

missed some more?:

Symfony\Component\Form\FormBuilderInterface::create
Symfony\Component\OptionsResolver\OptionsResolverInterface::replaceDefaults

@stof
Copy link
Contributor Author

stof commented Oct 15, 2013

Well, the autocompletion of keys inside $options does not seem to work inside buildForm or buildView

@stof
Copy link
Contributor Author

stof commented Oct 15, 2013

Note that I'm not talking of autcompletion for arguments when calling buildForm. I'm talking of the autocompletion of keys inside the form type method when using the $options argument

@Haehnchen
Copy link
Owner

todo notice: extend missing method to resolove issue
8fa771c

@Haehnchen
Copy link
Owner

we are ready, but by now only "goto" is supported: http://youtrack.jetbrains.com/issue/WI-21563

@Haehnchen
Copy link
Owner

now ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants