*/ /** * Klasa stPointsFrontendActions. * * @package stPointsPlugin * @subpackage actions */ class stPointsFrontendActions extends stActions { /** * Wyświetla listę zamówien klienta */ public function executeList() { $this -> smarty = new stSmarty($this -> getModuleName()); $this -> forwardif($this -> getUser() -> isAnonymous(), 'stUser', 'loginUser'); $c = new Criteria(); $c -> addDescendingOrderByColumn(UserPointsPeer::CREATED_AT); $c -> add(UserPointsPeer::SF_GUARD_USER_ID, $this -> getUser() -> getGuardUser() -> getId()); $this -> pager = new sfPropelPager('UserPoints', 20); $this -> pager -> setPeerMethod('doSelectJoinSfGuardUserRelatedBySfGuardUserId'); $this -> pager -> setCriteria($c); $this -> pager -> setPage($this -> getRequestParameter('page')); $this -> pager -> init(); } }