Are they?  They seem to extend Zend_Form_Decorator_Abstract which implements
Zend_Form_Decorator_Interface.  They certainly *have* a form element
(_element) but don't extend them as far as I can tell.

The approximate process to render a the markup for a form element is
form->render() calls each element->render()
element->render() calls each decorator->render(), one of which will be
Zend_Form_Decorator_ViewHelper->render()
Zend_Form_Decorator_ViewHelper->render() calls a view helper to render the
markup for the element.


My question is *why* Zend_Form_Decorator_ViewHelper uses a view helper to
render the element when this could be done directly by a decorator.  It adds
a layer of complexity to the process that isn't present in other 
Zend_Form_Decorator_* and there must be a good reason for it.





keith Pope-4 wrote:
> 
> 
> Zend_Form_Decorator_* are extensions of Zend_Form_Element this
> represents a form element, and contains all the default decorators,
> validators, filters etc These will have a view helpers assigned to
> them like public $helper = 'formTextarea'. The form then renders the
> form elements.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/On-view-helpers---decorators-tp23054740p23056253.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to