public static function retrieveByPK($test_schedule_id, $location_id, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $criteria = new Criteria(); $criteria->add(VTestApplSched1Peer::TEST_SCHEDULE_ID, $test_schedule_id); $criteria->add(VTestApplSched1Peer::LOCATION_ID, $location_id); $v = VTestApplSched1Peer::doSelect($criteria, $con); return !empty($v) ? $v[0] : null; }
public function executeShowLocation() { $c = new Criteria(); $c->add(VTestApplSched1Peer::TEST_SCHEDULE_ID, $this->getRequestParameter('id')); $c->add(VTestApplSched1Peer::LOCATION_ID, $this->getRequestParameter('location_id')); $this->test_schedule = VTestApplSched1Peer::doSelectOne($c); }
public function getVTestApplSched1sJoinTestSchedule($criteria = null, $con = null) { include_once 'lib/model/om/BaseVTestApplSched1Peer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collVTestApplSched1s === null) { if ($this->isNew()) { $this->collVTestApplSched1s = array(); } else { $criteria->add(VTestApplSched1Peer::LOCATION_ID, $this->getId()); $this->collVTestApplSched1s = VTestApplSched1Peer::doSelectJoinTestSchedule($criteria, $con); } } else { $criteria->add(VTestApplSched1Peer::LOCATION_ID, $this->getId()); if (!isset($this->lastVTestApplSched1Criteria) || !$this->lastVTestApplSched1Criteria->equals($criteria)) { $this->collVTestApplSched1s = VTestApplSched1Peer::doSelectJoinTestSchedule($criteria, $con); } } $this->lastVTestApplSched1Criteria = $criteria; return $this->collVTestApplSched1s; }
</td> <td><?php echo $test_schedule->getRegTestPeriod()->getRegPeriod() ? $test_schedule->getRegTestPeriod()->getRegPeriod()->getAcademicCalendar()->getDepartment()->toString() : '-'; ?> </td> <td><?php echo $test_schedule->getRegTestPeriod()->getRegPeriod() ? $test_schedule->getRegTestPeriod()->getRegPeriod()->getAcademicCalendar()->getYear() : '-'; ?> </td> <td><?php echo $test_schedule->getStart() ? $test_schedule->getStart('d-m-Y') : '-'; ?> </td> <td align="center" style="text-align:center;"> <?php $c = new Criteria(); $c->add(VTestApplSched1Peer::TEST_SCHEDULE_ID, $test_schedule->getId()); $test_count = VTestApplSched1Peer::doCount($c); echo $test_count; ?> </td> </tr> <?php } ?> <?php } ?> </tbody> </table>
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = VTestApplSched1Peer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setTestScheduleId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setLocationId($arr[$keys[1]]); } }