Example #1
0
 public function getJobInformationsJoinPublicInformation($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseJobInformationPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collJobInformations === null) {
         if ($this->isNew()) {
             $this->collJobInformations = array();
         } else {
             $criteria->add(JobInformationPeer::JOB_CATEGORY_ID, $this->getId());
             $this->collJobInformations = JobInformationPeer::doSelectJoinPublicInformation($criteria, $con);
         }
     } else {
         $criteria->add(JobInformationPeer::JOB_CATEGORY_ID, $this->getId());
         if (!isset($this->lastJobInformationCriteria) || !$this->lastJobInformationCriteria->equals($criteria)) {
             $this->collJobInformations = JobInformationPeer::doSelectJoinPublicInformation($criteria, $con);
         }
     }
     $this->lastJobInformationCriteria = $criteria;
     return $this->collJobInformations;
 }
Example #2
0
        ?>
							</p>
						</td>
                        <td><?php 
        echo $job_information->getMenuOrder() ? $job_information->getMenuOrder() : '-';
        ?>
</td>
                        <td><?php 
        echo $job_information->getDisplayMenu() ? __('yes') : __('no');
        ?>
</td>
                        <td>
						<?php 
        $c = new Criteria();
        $c->add(JobInformationPeer::JOB_ID, $job_information->getId());
        $job_info = JobInformationPeer::doSelectOne($c);
        if ($job_info) {
            echo $job_info->getJobCategoryId() ? $job_info->getJobCategory()->toString() : '-';
        } else {
            echo '-';
        }
        ?>
</td>
						<td>
						<?php 
        if ($job_info) {
            echo $job_info->getPublicInformationId() ? $job_info->getPublicInformation()->getSubject() : '-';
        } else {
            echo '-';
        }
        ?>
Example #3
0
 public function executeListStatus()
 {
     $c = new Criteria();
     $c->add(JobPeer::CODE, 'pmb_menu/listStatus');
     $job = JobPeer::doSelectOne($c);
     $cw = new Criteria();
     $cw->add(JobInformationPeer::JOB_ID, $job->getId());
     $job_information = JobInformationPeer::doSelectOne($cw);
     $public_information = PublicInformationPeer::retrieveByPk($job_information->getPublicInformationId());
     $job_category = JobCategoryPeer::retrieveByPk($job_information->getJobCategoryId());
     $this->job = $job;
     $this->job_information = $job_information;
     $this->job_category = $job_category;
     $this->public_information = $public_information;
 }
Example #4
0
 public function executeDelete()
 {
     $job = JobPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($job);
     $job_information = JobInformationPeer::retrieveByPk($this->getRequestParameter('job_information_id'));
     $this->forward404Unless($job_information);
     $ref_error = 0;
     foreach ($job->getRefCountMethods() as $ref) {
         $method = "count" . $ref['affix'];
         $count = $job->{$method}();
         if ($count > 0) {
             ++$ref_error;
             $this->getRequest()->setError('job/delete/' . sfInflector::camelize($ref['table']), $count);
         }
     }
     if ($ref_error > 0) {
         $this->getRequest()->setError('job/delete', '_ERR_DELETE_ (' . $job->toString() . ' - id:' . $job->getId() . ')');
     } else {
         $job->delete();
         $job_information->delete();
     }
     return $this->forward('job_information', 'list');
 }
 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(JobInformationPeer::ID, $pks, Criteria::IN);
         $objs = JobInformationPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
Example #6
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = JobInformationPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setJobId($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setPublicInformationId($arr[$keys[2]]);
     }
     if (array_key_exists($keys[3], $arr)) {
         $this->setJobCategoryId($arr[$keys[3]]);
     }
 }