I'll try with plugin namespces, thanks. About having option (setClassName()),
I don't see how can you use it, because rendering is initialized and
triggered by Zend_Form_Element_Select, maybe you can subclass it, but this
leads to complications. Or I'm missing sth?

Regards,
Saša Stamenković


On Thu, Oct 29, 2009 at 4:16 PM, drm <[email protected]> wrote:

> Саша Стаменковић wrote:
>
>> class Umpirsky_View_Helper_FormSelectCustom extends
>> Zend_View_Helper_FormSelect {
>>
> Hi Saša,
>
> Good solution, which I would have suggested if same classes for all the
> options wouldn't suffice.
>
> Little suggestion: name your class Umpirsky_View_Helper_FormSelect and add
> Umpirsky_View_Helper_ as a plugin namespace to the view helper's plugin
> loader, and remove the formSelectCustom() method from the class. This way
> you don't have to explicitly refer to your "formSelectCustom" view helper.
> Make the setting of the classname an option (setClassName()) so _build() can
> delegate to parent::_build() if the option is not set. This way you can
> generically implement other class names for different types of selects in
> stead of needing more view helpers.
>
>

Reply via email to