http://trac.symfony-project.org/wiki/sfDoctrinePager
$maxPerPage = 10;
$myPager = new sfDoctrinePager('MyVideo', $maxPerPage);
$query = MyVideoTable::getInstance()->createQuery('v')->where('is_active = ?', 1)
->andWhere('created_by = ?', sfContext::getInstance()->getUser()->getUserId());
$myPager->setQuery($query);
$page = sfContext::getInstance()->getRequest()->getParameter('page', 1);
$myPager->setPage($page);
$myPager->init();
Title:
Symfony sfDoctrinePager
Description:
http://trac.symfony-project.org/wiki/sfDoctrinePager $maxPerPage = 10; $myPager = new sfDoctrinePager('MyVideo', $maxPerPage); ...
...
Rating:
4