public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser) { // TODO - verify permissions for viewing lists // $detailed = $this->getP ( "detailed" , false ); $limit = $this->getP("page_size", 10); if ($limit > 30) { $limit = 30; } $page = $this->getP("page", 1); //$order_by = int( $this->getP ( "order_by" , -1 ) ); $offset = ($page - 1) * $limit; // kuserPeer::setUseCriteriaFilter( false ); $c = new Criteria(); // filter $filter = new notificationFilter(); $fields_set = $filter->fillObjectFromRequest($this->getInputParams(), "filter_", null); $filter->attachToCriteria($c); //if ($order_by != -1) kshowPeer::setOrder( $c , $order_by ); $count = notificationPeer::doCount($c); $offset = ($page - 1) * $limit; $c->setLimit($limit); if ($offset > 0) { $c->setOffset($offset); } $list = notificationPeer::doSelect($c); $level = objectWrapperBase::DETAIL_LEVEL_REGULAR; $this->addMsg("count", $count); $this->addMsg("page_size", $limit); $this->addMsg("page", $page); $wrapper = objectWrapperBase::getWrapperClass($list, $level); $this->addMsg("notifications", $wrapper); }
/** * Retrieve multiple objects by pkey. * * @param array $pks List of primary keys * @param PropelPDO $con the connection to use * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function retrieveByPKs($pks, PropelPDO $con = null) { $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(notificationPeer::DATABASE_NAME); $criteria->add(notificationPeer::ID, $pks, Criteria::IN); $objs = notificationPeer::doSelect($criteria, $con); } return $objs; }