|
|
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
|