|
|||
|
Hello,
I have a question about using an function from one controller in to an other controller. Lets say i have a productController with the method getProductInfo and i have an userController. Now i want to get all the info for the users products so i want to use the function getProductInfo from the productController but i'm in the userController... I've tried to make an new productController then i get a error from the __construct.. I just want to use one function from a other controller in to my userController.. Can somebody help me? Thanks and regards!! Last edited by Daniel B : 06-17-2008 at 01:34 PM. |
|
|||
|
Hi Daniel,
It sounds to me like the method should really be in the model. If you put the method in the model and then require the model, you can then call the method to retrieve your data. Is that what you mean? I hope this helps. |
|
|||
|
Daniel,
Glad I could be of assistance. Here is a link to a quick start tutorial using MVC and ZF. I am sure there are others, but this is one of the first ones that I came across. Typically, any methods that you want to access data should be stored in the apropriate model file. There are several examples and tutorials. Best of luck to you and if I can help you any further please feel free to just ask. ![]() |
|
|||
|
try to use the forward functio n , example :
Quote:
.. Quote:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|