ZF-4978: Improve error handling on erasing default decorators

Issue Type: Improvement Created: 2008-11-18T12:06:31.000+0000 Last Updated: 2009-01-28T05:41:13.000+0000 Status: Resolved Fix version(s): - 1.8.0 (30/Apr/09)

Reporter: Thomas Weidner (thomas) Assignee: Thomas Weidner (thomas) Tags: - Zend_Form

Related issues: Attachments:


Several form element, specially File and Image use own default decorators. When a user set's his own decorators with setDecorator and erases the default one it can come to problems. Therefor the following solution will be implemented:

  • Create a marker interface per problematic decorator
  • Problematic decorators implement this marker interfaces
  • render() method in file element loops through all attached decorators and searches if this marker interface was implemented
  • When no marker interface was found, raise exception
  • After checking for decorator call parent::render()
  • Of course also unit tests and documentation have to be added


Posted by Thomas Weidner (thomas) on 2009-01-28T05:40:50.000+0000

Integrated with r13811.

But restricted to the file element. For all other elements the marker interface will not be used.

There are plans to rework how default decorators work. So this new feature is just an workaround until the new solution has been integrated.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.