示例#1
0
 public function getClassAbsencesJoinClassAgenda($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseClassAbsencePeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collClassAbsences === null) {
         if ($this->isNew()) {
             $this->collClassAbsences = array();
         } else {
             $criteria->add(ClassAbsencePeer::STUDENT_ABSENCE_ID, $this->getId());
             $this->collClassAbsences = ClassAbsencePeer::doSelectJoinClassAgenda($criteria, $con);
         }
     } else {
         $criteria->add(ClassAbsencePeer::STUDENT_ABSENCE_ID, $this->getId());
         if (!isset($this->lastClassAbsenceCriteria) || !$this->lastClassAbsenceCriteria->equals($criteria)) {
             $this->collClassAbsences = ClassAbsencePeer::doSelectJoinClassAgenda($criteria, $con);
         }
     }
     $this->lastClassAbsenceCriteria = $criteria;
     return $this->collClassAbsences;
 }
示例#2
0
        echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
        ?>
</td>
						<td class='first'><b><?php 
        echo $student_absence->getStudent() ? $student_absence->getStudent()->getCode() : '-';
        ?>
</b></td>
                        <td><b><?php 
        echo $student_absence->getStudent() ? $student_absence->getStudent()->getName() : '-';
        ?>
</b></td>
						<td><?php 
        $c = new Criteria();
        $c->add(ClassAbsencePeer::STUDENT_ABSENCE_ID, $student_absence->getId());
        $class_absence = ClassAbsencePeer::doSelectOne($c);
        $class_count = ClassAbsencePeer::doCount($c);
        #if ($class_count > 1) {
        echo $class_absence->getClassAgenda() ? $class_absence->getClassAgenda()->getCourseSchedule()->getSubjectCurr()->getSubject()->getName() : '-';
        #} else {
        #	echo '-';
        #}
        ?>
                        
                        </td>
                        <td><?php 
        echo $student_absence->getStart('d-m-Y');
        ?>
</td>
					</tr>
				<?php 
    }
示例#3
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = ClassAbsencePeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setClassAgendaId($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setStudentAbsenceId($arr[$keys[2]]);
     }
 }
示例#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(ClassAbsencePeer::ID, $pks, Criteria::IN);
         $objs = ClassAbsencePeer::doSelect($criteria, $con);
     }
     return $objs;
 }