Beispiel #1
0
 public function executeRequests(sfWebRequest $request)
 {
     # arrived requests
     $this->mission_requests = MissionRequestPeer::getRsNonProcessed($count);
     $this->mission_requests_count = $count;
     # available missions
     $this->available_mission_legs = MissionLegPeer::getRsAvailable($count);
     $this->available_mission_legs_count = $count;
     # coordinated missions
     $this->coordinated_mission_legs = MissionLegPeer::getRsCoordinated($count);
     $this->coordinated_mission_legs_count = $count;
     # pilot requests
     # filter
     $this->processFilter($request);
     $this->pager = PilotRequestPeer::getPager($this->max, $this->page, $this->req_date1, $this->req_date2, $this->miss_date1, $this->miss_date2, $this->not_process, $this->hold, $this->process);
     $this->pilot_reqs = $this->pager->getResults();
     $this->date_widget = new widgetFormDate(array('format_date' => array('js' => 'mm/dd/yy', 'php' => 'm/d/Y')), array('class' => 'text'));
     # member requests
     $c = new Criteria();
     $c->add(ApplicationTempPeer::RENEWAL, null, Criteria::ISNULL);
     $c->add(ApplicationTempPeer::MEMBER_ID, null, Criteria::ISNULL);
     $c->add(ApplicationTempPeer::PROCESSED_DATE, null, Criteria::ISNULL);
     $c->setLimit(50);
     $this->member_requests = ApplicationTempPeer::doSelect($c);
     $this->transportations = array('air_mission' => 'Air Mission', 'ground_mission' => 'Ground Mission', 'commercial_mission' => 'Commercial Mission');
     if ($request->hasParameter('return')) {
         $this->pilot_request_one = true;
     }
 }
 /**
  * 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)
 {
     if ($con === null) {
         $con = Propel::getConnection(ApplicationTempPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(ApplicationTempPeer::DATABASE_NAME);
         $criteria->add(ApplicationTempPeer::ID, $pks, Criteria::IN);
         $objs = ApplicationTempPeer::doSelect($criteria, $con);
     }
     return $objs;
 }