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(VCounselingPeer::ID, $pks, Criteria::IN); $objs = VCounselingPeer::doSelect($criteria, $con); } return $objs; }
public function getVCounselings($criteria = null, $con = null) { include_once 'lib/model/om/BaseVCounselingPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collVCounselings === null) { if ($this->isNew()) { $this->collVCounselings = array(); } else { $criteria->add(VCounselingPeer::EMPLOYEE_ID, $this->getId()); VCounselingPeer::addSelectColumns($criteria); $this->collVCounselings = VCounselingPeer::doSelect($criteria, $con); } } else { if (!$this->isNew()) { $criteria->add(VCounselingPeer::EMPLOYEE_ID, $this->getId()); VCounselingPeer::addSelectColumns($criteria); if (!isset($this->lastVCounselingCriteria) || !$this->lastVCounselingCriteria->equals($criteria)) { $this->collVCounselings = VCounselingPeer::doSelect($criteria, $con); } } } $this->lastVCounselingCriteria = $criteria; return $this->collVCounselings; }
public function executeGetAssignedCounselorByAccal() { $accal_id = $this->getRequestParameter('academic_calendar_id'); $accal = AcademicCalendarPeer::retrieveByPK($accal_id); $array = array(); if ($accal) { $c = new Criteria(); $c->add(VCounselingPeer::ACADEMIC_CALENDAR_ID, $accal_id); $objs = VCounselingPeer::doSelect($c); if ($this->getRequestParameter('include_blank') == 'true') { $array[] = ''; } foreach ($objs as $o) { $array[$o->getId()] = $o->toStringEmployee() . ' # ' . $o->getClassGroup()->toString() . ' # ' . $o->getStudentCount(); } } $this->content = $array; $this->setTemplate('buildOptions'); }