Zend Framework. How can I use the same kind of script with different actions in the controller?

My question basically is that I have many routes configured for CRUD operations. Therefore, there are different actions inside the controller for inserting, updating, deleting and selecting. For insert, update and delete, I would like to use the same kind of script. Is it possible?

+8
zend-framework
source share
1 answer

You simply specify the name of the view script using the ViewRenderer action helper. for example

 $this->_helper->viewRenderer('action'); 

Edit: If the script view is part of another controller, see ZEND, displaying different views with data

+17
source share

All Articles