Quantcast

There are a few problems with zf2

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

There are a few problems with zf2

semihsari
This post has NOT been accepted by the mailing list yet.
hi,

I tried a few things, but having some problems at zf 2;

1. How do see current _getParam controller and action name or other params
2. How do Paginator from db eg.

that's ok (IndexController/indexAction())
        $match = $this->getEvent()->getRouteMatch();
        $sm = $this->getServiceLocator();
        $tableUsers = $sm->get('TableUsers');

        $query = $tableUsers->getSql()->select();
        $results = $tableUsers->select($query);

        $resultsUsers = Paginator::factory($results);
        $resultsUsers->setCurrentPageNumber($match->getParam('page', 1));
        $resultsUsers->setItemCountPerPage(5);

but how do echo links from paginator.phtml

3. How do write init() method in controller or in Module
and
how do reach variables getParam sessions bla bla in views from module

Loading...