Issues

ZF-4978: Improve error handling on erasing default decorators

Description

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

Comments

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.