Exemplo n.º 1
0
 public function getSubjectAccalLectorsJoinSubjectAccal($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseSubjectAccalLectorPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collSubjectAccalLectors === null) {
         if ($this->isNew()) {
             $this->collSubjectAccalLectors = array();
         } else {
             $criteria->add(SubjectAccalLectorPeer::EMPLOYEE_ID, $this->getId());
             $this->collSubjectAccalLectors = SubjectAccalLectorPeer::doSelectJoinSubjectAccal($criteria, $con);
         }
     } else {
         $criteria->add(SubjectAccalLectorPeer::EMPLOYEE_ID, $this->getId());
         if (!isset($this->lastSubjectAccalLectorCriteria) || !$this->lastSubjectAccalLectorCriteria->equals($criteria)) {
             $this->collSubjectAccalLectors = SubjectAccalLectorPeer::doSelectJoinSubjectAccal($criteria, $con);
         }
     }
     $this->lastSubjectAccalLectorCriteria = $criteria;
     return $this->collSubjectAccalLectors;
 }
Exemplo n.º 2
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(SubjectAccalLectorPeer::ID, $pks, Criteria::IN);
         $objs = SubjectAccalLectorPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
Exemplo n.º 3
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = SubjectAccalLectorPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setSubjectAccalId($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setEmployeeId($arr[$keys[2]]);
     }
 }
Exemplo n.º 4
0
 public function executeGetLectors()
 {
     $subject_accal_id = $this->getRequestParameter('subject_accal_id');
     $c = new Criteria();
     $c->add(SubjectAccalLectorPeer::SUBJECT_ACCAL_ID, $subject_accal_id);
     $objs = SubjectAccalLectorPeer::doSelect($c);
     $lectors = array();
     foreach ($objs as $o) {
         $lectors[$o->getEmployeeId()] = $o->getEmployee()->toString();
     }
     $this->content = $lectors;
     $this->setTemplate('buildOptions');
 }