how to call a view method to a model in zendframework
Posted
by
Awais Qarni
on Stack Overflow
See other posts from Stack Overflow
or by Awais Qarni
Published on 2011-09-08T06:03:41Z
Indexed on
2012/09/16
21:38 UTC
Read the original article
Hit count: 228
hello I just want to ask whether we can call a view method to a model? I know that we can call it on our controller in zend framework. Like if I want to call the url method of view on my controller I can call it like this
$this->view->url(array(),'');
and on the view we just can call it by
$this->url(array(),'');
But When I tried to call the same method on my model by
$this->view->url(array(),'');
it generates an error of call to undefined method url
.
Now I want to ask whether it is possible to call view method to a model? If yes then how? What Am I doing wrong.
Thanks
© Stack Overflow or respective owner