Naah, a little drag :)

I didn't like factory methods at first, didn't like strings instead
constants..., but now I just don't want to break the chain.

Will do it like you said

 $group = $form->getDisplayGroup('
group1');
   $group->removeDecorator('Label');

Thanks for the fast response!

Regards,
Saša Stamenković


On Tue, Nov 17, 2009 at 7:33 PM, Matthew Weier O'Phinney
<matt...@zend.com>wrote:

> -- umpirsky <umpir...@gmail.com> wrote
> (on Tuesday, 17 November 2009, 10:28 AM -0800):
> > I use factory method Zend_Form::addDisplayGroup() to add display group,
> and
> > it works great:
> >
> > ...
> > )->addDisplayGroup(
> >               array(
> >                       'el1',
> >                       'el2',
> > ...
> >                       'eln'
> >               ),
> >               'group1')...
> >
> > I want to remove label decorator. Is that possible with factory method or
> I
> > must pass all decorators, or instantiate Zend_Form_DisplayGroup and call
> > removeDecorator?
>
> If you use the factory method, you need to indicate the exact set of
> decorators you want to use.
>
> You can also call removeDecorator() *after* instantiating the group.
>
>    $group = $form->getDisplayGroup('group1');
>    $group->removeDecorator('Label');
>
> --
> Matthew Weier O'Phinney
> Project Lead            | matt...@zend.com
> Zend Framework          | http://framework.zend.com/
>

Reply via email to