Пример #1
0
 public function getOutboxEmpsRelatedByEmployee2JoinStudent($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseOutboxEmpPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collOutboxEmpsRelatedByEmployee2 === null) {
         if ($this->isNew()) {
             $this->collOutboxEmpsRelatedByEmployee2 = array();
         } else {
             $criteria->add(OutboxEmpPeer::EMPLOYEE_2, $this->getId());
             $this->collOutboxEmpsRelatedByEmployee2 = OutboxEmpPeer::doSelectJoinStudent($criteria, $con);
         }
     } else {
         $criteria->add(OutboxEmpPeer::EMPLOYEE_2, $this->getId());
         if (!isset($this->lastOutboxEmpRelatedByEmployee2Criteria) || !$this->lastOutboxEmpRelatedByEmployee2Criteria->equals($criteria)) {
             $this->collOutboxEmpsRelatedByEmployee2 = OutboxEmpPeer::doSelectJoinStudent($criteria, $con);
         }
     }
     $this->lastOutboxEmpRelatedByEmployee2Criteria = $criteria;
     return $this->collOutboxEmpsRelatedByEmployee2;
 }
Пример #2
0
 public function executeDelete()
 {
     $outbox_emp = OutboxEmpPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($outbox_emp);
     $outbox_emp->delete();
     return $this->redirect('employee_outmail/list');
 }
Пример #3
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(OutboxEmpPeer::ID, $pks, Criteria::IN);
         $objs = OutboxEmpPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
Пример #4
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = OutboxEmpPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setCode($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setStudentId($arr[$keys[2]]);
     }
     if (array_key_exists($keys[3], $arr)) {
         $this->setEmployeeId($arr[$keys[3]]);
     }
     if (array_key_exists($keys[4], $arr)) {
         $this->setEmployee2($arr[$keys[4]]);
     }
     if (array_key_exists($keys[5], $arr)) {
         $this->setSubject($arr[$keys[5]]);
     }
     if (array_key_exists($keys[6], $arr)) {
         $this->setDetail($arr[$keys[6]]);
     }
     if (array_key_exists($keys[7], $arr)) {
         $this->setCreatedAt($arr[$keys[7]]);
     }
     if (array_key_exists($keys[8], $arr)) {
         $this->setType($arr[$keys[8]]);
     }
 }