-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Form render fails with minimal control implementation on missing get/setOption() #132
Comments
Another problem - Also, getOption() is used for id, class, description and type===button. getHtmlId() (already in BaseControl), getClass() getDescription() and isButton() would be also useful in IRenderableControl interface. |
I've just ran into this issue as well. Was kind of confused what happened. I render form with Implementing these stubs "fix" (read: it does not scream) it, but proper solution would be better. public function setOption($key, $value)
{}
public function getOption($key, $default = null)
{}
public function getOptions(): array
{
return [];
} I'm sorry, but I'm just starting to understand what's going on in component model so I don't feel strong enough to make PR. |
I know about these issues, it is not possible to solve it gradually to maintain backward compatibility, so I leave it to the next larger version. |
See test that confirms the failure:
http://pastebin.com/Xwpha0v2
my suggestions:
By the way, there are a lot more methods missing from the minimal interface implementation to satisfy DefaultFormRenderer:
I think all these should be also included in IControl interface. EDIT: or create IRenderableControl interface extending IControl for these to keep the IControl simple
If you agree with my suggestions, I can implement and pullrequest it.
The text was updated successfully, but these errors were encountered: