Anothers Zend_Form Idea

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Anothers Zend_Form Idea

Tales Santos
Hi ZF team,

I would like to suggest the usage of events (call back) on the Zend_Form.

eg.:

public function addElement(.....)
{
     $this->beforeAddElement();
     //addElement script here
     $this->afterAddElement();
}

public function removeElement(.....)
{
     $this->beforeRemoveElement();
     //RemoveElement script here
     $this->afterRemoveElement();
}

public function render(.....)
{
     $this->beforeRender();
     //Render form here
     $this->afterRender();
}

........

The idea is like to method init() in the constructor.