Ejemplo n.º 1
0
 public function getGradCeremonysJoinStudent($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseGradCeremonyPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collGradCeremonys === null) {
         if ($this->isNew()) {
             $this->collGradCeremonys = array();
         } else {
             $criteria->add(GradCeremonyPeer::ACADEMIC_CALENDAR_ID, $this->getId());
             $this->collGradCeremonys = GradCeremonyPeer::doSelectJoinStudent($criteria, $con);
         }
     } else {
         $criteria->add(GradCeremonyPeer::ACADEMIC_CALENDAR_ID, $this->getId());
         if (!isset($this->lastGradCeremonyCriteria) || !$this->lastGradCeremonyCriteria->equals($criteria)) {
             $this->collGradCeremonys = GradCeremonyPeer::doSelectJoinStudent($criteria, $con);
         }
     }
     $this->lastGradCeremonyCriteria = $criteria;
     return $this->collGradCeremonys;
 }
Ejemplo n.º 2
0
 public function executeDoConfirm()
 {
     $id = $this->getRequestParameter('id');
     $ac_id = $this->getRequestParameter('academic_calendar_id');
     $gc = GradCeremonyPeer::retrieveByPK($id);
     $this->forward404Unless($gc);
     $gc->setAcademicCalendarId($ac_id);
     $gc->setStatus(GradCeremony::STATUS_ONPROGRESS);
     $gc->save();
     return $this->forward('grad_ceremony', 'list');
 }
Ejemplo n.º 3
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = GradCeremonyPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setStudentId($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setAcademicCalendarId($arr[$keys[2]]);
     }
     if (array_key_exists($keys[3], $arr)) {
         $this->setStatus($arr[$keys[3]]);
     }
 }
Ejemplo n.º 4
0
 public static function retrieveByPKs($pks, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria();
         $criteria->add(GradCeremonyPeer::ID, $pks, Criteria::IN);
         $objs = GradCeremonyPeer::doSelect($criteria, $con);
     }
     return $objs;
 }