-
Notifications
You must be signed in to change notification settings - Fork 2.5k
set shared false for view_helpers doesn't work #4221
Comments
it is work if i used :
but if i used
it does'nt work |
If you want to take a stab at it, take a look at the __call magic method, and see how it differs from the plugin() method. |
@weierophinney is it a 'bug' ? |
I have form view helper behaviour that could confirm this issue for ZF 2.3.1. Here is my As you can see I set public function getViewHelperConfig()
{
return array(
'invokables' => array(
'formelement' => 'Application\Form\View\Helper\FormElement',
'formautocompletehidden' => 'Application\Form\View\Helper\FormAutocompleteHidden'
),
'shared' => array(
'formelement' => false,
'formautocompletehidden' => false
),
);
} But when the form and both elements sharing the same view helper are rendered the |
@alexp assumes following solution posted on stackoverflow:
Does this help @weierophinney , @samsonasik ? |
…reate new instance
…reate new instance
…reate new instance
@weierophinney @webdevilopers I give it a try at PR #6786 , please let me know if I missed something. |
…reate new instance
Handled in #6786 |
…lpers should create new instance
…erer-plugin-cache' into develop Close zendframework/zendframework#6786 Close zendframework/zendframework#4221
i'm using ZF 2.1.5, i have created a simple view helper
and create a factory for that :
and register it at view_helpers :
i tried call from view for multiple time, but echo 'simple'; just called at first time. If i try in 'service_manager' key, it just work.
The text was updated successfully, but these errors were encountered: