-
-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Milestone
Description
See test that confirms the failure:
http://pastebin.com/Xwpha0v2
my suggestions:
- Nette\Forms\IControl should extend Nette\ComponentModel\IComponent (shouldn't even break BC of any existing controls, because $form->addComponent() receives only IComponent anyway)
- wouldn't it be better if DefaultFormRenderer holds rendered components list in SplObjectStorage rather than setting an option to the control object?
By the way, there are a lot more methods missing from the minimal interface implementation to satisfy DefaultFormRenderer:
- getForm
- isRequired
- getLabel
- getControl
- hasErrors
- getErrors
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.
janpecha and dakur
Metadata
Metadata
Assignees
Labels
No labels