You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
I don't see a coherent solution which doesn't involve overhauling how stuff works.
If you move towards constructor injection this would break many factories people wrote.
Zend\ServiceManager\Initializer\InitializerInterface does not support passing options. If it did you could move the setOptions() logic to there with little BC break.
(DelgatorFactoryInterface does support passing options but you'd have to register it for every element).
The text was updated successfully, but these errors were encountered:
Erikvv
changed the title
Element::init is called before Element::setOptions when using Zend\Form\Factory
Element::init is called before Element::setOptions when using Zend\Form\Factory but not when using FormElementManager
Aug 20, 2018
How can you initialize if you don't have the options?
This is closely related to #138
Code to reproduce the issue
Expected results
setOptions
init
setOptions
init
Actual results
init
setOptions
setOptions
init
Workaround
There are several different workarounds:
$this->add()
in a fieldset. Write factories which initialize elements and fieldsets.Proper fix
I don't see a coherent solution which doesn't involve overhauling how stuff works.
If you move towards constructor injection this would break many factories people wrote.
Zend\ServiceManager\Initializer\InitializerInterface does not support passing options. If it did you could move the setOptions() logic to there with little BC break.
(DelgatorFactoryInterface does support passing options but you'd have to register it for every element).
The text was updated successfully, but these errors were encountered: