How do you output a Zend break control outside of a view?

I am creating a wrapper class in a Zend framework to encapsulate some data and a pagination control.

How to deduce this line from representation in the controller:

<?= $this->paginationControl($this->oPaginator, 'Sliding', 'pagination-control.phtml')?> 

Thanks in advance.

... Answered my own question:

 $this->view->oPaginator = $this->oPaginator; echo $this->view->paginationControl($this->view->oPaginator, 'Sliding', 'pagination-control.phtml'); 
+4
source share
1 answer

You can access the view object in the controller using $this->view . So you should be able to repeat this as follows:

 echo $this->view->paginationControl($this->view->oPaginator, 'Sliding', 'pagination-control.phtml'); 

But I think that something is wrong with your application if you need to repeat this in the controller. Why would you want to do that?

+2
source

Source: https://habr.com/ru/post/1382252/


All Articles