Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Form] Added getBlockPrefix() to ResolvedFormTypeInterface#16749
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thank you@webmozart. |
…ce (webmozart)This PR was merged into the 3.0-dev branch.Discussion----------[Form] Added getBlockPrefix() to ResolvedFormTypeInterface| Q | A| ------------- | ---| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -This is the follow-up PR to#16724.If you call `$form->getConfig()->getType()`, all the methods of FormType should be usable. In that sense, ResolvedFormType is the developer-facing version of FormType.It is true that the same could be achieved with `getInnerType()`, but that method should be used in edge cases only as it clutters the code and makes it confusing to read:```php$blockPrefix = $form->getConfig()->getType()->getInnerType()->getBlockPrefix();```Commits-------7e89345 [Form] Added getBlockPrefix() to ResolvedFormTypeInterface
Would it make sense then to let |
@xabbuh Not really. ResolvedFormTypeInterface is justlike FormType, but not exactly the same, as it also contains references to the parent type and its type extensions. So |
@webmozart I see, thanks for the explanation. |
This PR was submitted for the master branch but it was merged into the 3.0 branch instead (closes#16752).Discussion----------[Form] document changes to form type interfaces| Q | A| ------------- | ---| Fixed tickets |#13407,#16024,#16724,#16749| License | MITCommits-------b297a0c [Form] document changes to form type interfaces
This is the follow-up PR to#16724.
If you call
$form->getConfig()->getType()
, all the methods of FormType should be usable. In that sense, ResolvedFormType is the developer-facing version of FormType.It is true that the same could be achieved with
getInnerType()
, but that method should be used in edge cases only as it clutters the code and makes it confusing to read: