• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP JobPeer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中JobPeer的典型用法代码示例。如果您正苦于以下问题:PHP JobPeer类的具体用法?PHP JobPeer怎么用?PHP JobPeer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了JobPeer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: executeList

 public function executeList()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, $this->getModuleName());
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     if (!$acl) {
         $this->forward('default', 'error404');
     }
     $this->can_add = $acl->getAddPriv() == 1;
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $c = new Criteria();
     $dept = $this->getContext()->getUser()->getAttribute('department', null, 'bo');
     $c->add(AcademicCalendarPeer::DEPARTMENT_ID, $dept->getChildRecurs(), Criteria::IN);
     $filters = null;
     if ($this->getRequest()->hasParameter('filters')) {
         $filters = $this->getRequestParameter('filters');
         if ($filters == 'clear') {
             $this->filters = null;
         } else {
             $defined_filter = false;
             foreach ($filters as $f) {
                 if (is_array($f)) {
                     if (strlen($f['from']) > 0 || strlen($f['to']) > 0) {
                         $defined_filter = true;
                         break;
                     }
                 } else {
                     if ($f != null && $f != '') {
                         $defined_filter = true;
                         break;
                     }
                 }
             }
             if ($defined_filter) {
                 $this->filters = $filters;
                 $this->filter($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', 999);
     $pager = new sfPropelPager('AcademicCalendar', $rpp);
     $pager->setPeerMethod('doSelectOrdered');
     $pager->setCriteria($c);
     $pager->setPage($this->getRequestParameter('page', 1));
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     $filter_string = "";
     if ($filters) {
         foreach ($filters as $key => $val) {
             $filter_string .= "&filters[{$key}]={$val}";
         }
         $filter_string = preg_replace('/^&/', '', $filter_string);
     }
     $this->actions = $actions;
 }
开发者ID:taryono,项目名称:school,代码行数:59,代码来源:actions.class.php


示例2: getParentName

 public function getParentName()
 {
     $parent = JobPeer::retrieveByPK($this->getParent());
     if ($parent) {
         return $parent->toString();
     } else {
         return '-';
     }
 }
开发者ID:taryono,项目名称:school,代码行数:9,代码来源:Job.php


示例3: executeList

 public function executeList()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, $this->getModuleName());
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     if (!$acl) {
         $this->forward('default', 'error404');
     }
     $this->can_add = $acl->getAddPriv() == 1;
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $dept = $this->getContext()->getUser()->getAttribute('department', null, 'bo');
     $c = new Criteria();
     $c->addAscendingOrderByColumn(CourseSchedulePeer::CLASS_GROUP_ID);
     $this->sort($c);
     if ($this->getRequest()->hasParameter('filters')) {
         $filters = $this->getRequestParameter('filters');
         if ($filters == 'clear') {
             $this->filters = null;
         } else {
             $defined_filter = false;
             foreach ($filters as $f) {
                 if (is_array($f)) {
                     if (strlen($f['from']) > 0 || strlen($f['to']) > 0) {
                         $defined_filter = true;
                         break;
                     }
                 } else {
                     if ($f != null && $f != '') {
                         $defined_filter = true;
                         break;
                     }
                 }
             }
             if ($defined_filter) {
                 $this->filters = $filters;
                 $this->filter($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'course'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'course');
     $pager = new sfPropelPager('CourseSchedule', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'course'));
     $this->getUser()->setAttribute('page', $page, 'course');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array();
     $this->actions = $actions;
     $this->subtitle = $dept->getName();
     $this->counseling = new Counseling();
     $this->dept = $dept;
 }
开发者ID:taryono,项目名称:school,代码行数:57,代码来源:actions.class.php


示例4: retrieveByCode

 public static function retrieveByCode($code, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $criteria = new Criteria(JobPeer::DATABASE_NAME);
     $criteria->add(JobPeer::CODE, $code);
     $v = JobPeer::doSelect($criteria, $con);
     return !empty($v) > 0 ? $v[0] : null;
 }
开发者ID:taryono,项目名称:school,代码行数:10,代码来源:JobPeer.php


示例5: executeAddJob

 public function executeAddJob(sfWebRequest $request)
 {
     $jobId = $request->getParameter("id");
     $job = JobPeer::retrieveByPK($jobId);
     $profile = $this->getUser()->getProfile();
     $to = "[email protected]";
     $subject = $profile->getFirstName() . " " . $profile->getLastName() . " is requestting to be added to job " . $job->getEvent();
     mail($to, $subject, $subject);
     JobPeer::addEmailLogMessage($jobId, "Request to be added", "[email protected]");
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:10,代码来源:actions.class.php


示例6: executeList

 public function executeList()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, $this->getModuleName());
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     $this->can_add = $acl->getAddPriv() == 1;
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $c = new Criteria();
     $dept = $this->getContext()->getUser()->getAttribute('department', null, 'bo');
     $c->add(ColLocationPeer::DEPARTMENT_ID, $dept->getChildRecurs(), Criteria::IN);
     $c->addJoin(ColItemPeer::COL_LOCATION_ID, ColLocationPeer::ID);
     $this->sort($c);
     if ($this->getRequest()->hasParameter('filters')) {
         $filters = $this->getRequestParameter('filters');
         if ($filters == 'clear') {
             $this->filters = null;
         } else {
             $defined_filter = false;
             foreach ($filters as $f) {
                 if ($f != null && $f != '') {
                     $defined_filter = true;
                     break;
                 }
             }
             if ($defined_filter) {
                 $this->filters = $filters;
                 $this->filter($c, $this->getRequestParameter('filters'));
             }
         }
     }
     #$rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'col_item'));
     $this->getUser()->setAttribute('max_per_page', 12, 'col_item');
     $pager = new sfPropelPager('ColItem', 12);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'col_item'));
     $this->getUser()->setAttribute('page', $page, 'col_item');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $filter_string = "";
     if ($this->filters) {
         foreach ($this->filters as $key => $val) {
             $filter_string .= "&filters[{$key}]={$val}";
         }
         $filter_string = preg_replace('/^&/', '', $filter_string);
     }
     $this->filter_string = $filter_string;
     $this->subtitle = '';
     $actions = array(array('name' => 'cetak', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
     $this->actions = $actions;
     $this->actions3 = array();
 }
开发者ID:taryono,项目名称:school,代码行数:55,代码来源:actions.class.php


示例7: executeShowStudent

 public function executeShowStudent()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, $this->getModuleName());
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     if (!$acl) {
         $this->forward('default', 'error404');
     }
     $subject = SubjectPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($subject);
     $this->subtitle = $subject->toString() . ' - id:' . $subject->getId();
     $this->subject = $subject;
 }
开发者ID:taryono,项目名称:school,代码行数:15,代码来源:actions.class.php


示例8: getJobsForAutocomplete

 public static function getJobsForAutocomplete($q)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers('Url');
     $c = new Criteria();
     $crit0 = $c->getNewCriterion(JobPeer::EVENT, $q . '%', Criteria::LIKE);
     $crit1 = $c->getNewCriterion(JobPeer::ID, $q . '%', Criteria::LIKE);
     $crit0->addOr($crit1);
     $c->add($crit0);
     $c->addDescendingOrderByColumn(JobPeer::EVENT);
     $c->setLimit(10);
     $jobs = JobPeer::doSelect($c);
     $arr = array();
     foreach ($jobs as $j) {
         $arr[] = array("name" => $j->getId() . " - " . $j->getEvent(), "url" => url_for('job_show', array("slug" => $j->getSlug())));
     }
     return $arr;
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:17,代码来源:JobPeer.php


示例9: executeList

 public function executeList()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, $this->getModuleName());
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     if (!$acl) {
         $this->forward('default', 'error404');
     }
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $actions = array();
     $this->actions = $actions;
     $this->byEmployee = false;
     $this->subtitle = 'Riwayat Penilaian';
     $this->counseling = new Counseling();
 }
开发者ID:taryono,项目名称:school,代码行数:18,代码来源:actions.class.php


示例10: executeListByEmployee

 public function executeListByEmployee()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, 'counseling/listByEmployee');
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     if (!$acl) {
         $this->forward('default', 'error404');
     }
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $dept = $this->getContext()->getUser()->getAttribute('department_id', null, 'bo');
     $actions = array();
     $this->actions = $actions;
     $this->subtitle = $employee->toString();
     $this->employee_id = $employee_id;
     $this->employee = $employee;
     $this->counseling = new Counseling();
 }
开发者ID:taryono,项目名称:school,代码行数:21,代码来源:actions.class.php


示例11: executeChartEmployees

 public function executeChartEmployees()
 {
     $data = array();
     foreach (JobPeer::doSelect(new Criteria()) as $job) {
         $c = new Criteria();
         $c->add(EmployeePeer::JOB_ID, $job->getId());
         $data[$job->getName()] = EmployeePeer::doCount($c);
     }
     //To create a bar chart we need to create a stBarOutline Object
     $bar = new stBarOutline(80, '#78B9EC', '#3495FE');
     $bar->key('', 10);
     //Passing the random data to bar chart
     $bar->data = $data;
     //Creating a stGraph object
     $g = new stGraph();
     $g->title('Employee Job Type Break-Down', '{font-size: 20px;}');
     $g->bg_colour = '#FFFFFF';
     $g->set_inner_background('#E3F0FD', '#CBD7E6', 90);
     $g->x_axis_colour('#8499A4', '#E4F5FC');
     $g->y_axis_colour('#8499A4', '#E4F5FC');
     //Pass stBarOutline object i.e. $bar to graph
     $g->data_sets[] = $bar;
     //Setting labels for X-Axis
     $g->set_x_labels(array_keys($data));
     // to set the format of labels on x-axis e.g. font, color, step
     $g->set_x_label_style(10, '#18A6FF', 0, 2);
     // To tick the values on x-axis
     // 2 means tick every 2nd value
     $g->set_x_axis_steps(2);
     //set maximum value for y-axis
     //we can fix the value as 20, 10 etc.
     //but its better to use max of data
     $g->set_y_max(max($data));
     $g->y_label_steps(4);
     $g->set_y_legend('# Employees', 12, '#18A6FF');
     echo $g->render();
     return sfView::NONE;
 }
开发者ID:anvaya,项目名称:nckids,代码行数:38,代码来源:actions.class.php


示例12: executeEdit

 public function executeEdit()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, $this->getModuleName());
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     if (!$acl) {
         $this->forward('default', 'error404');
     }
     $this->can_add = $acl->getAddPriv() == 1;
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $member_type = MemberTypePeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($member_type);
     $actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
     // if ($acl->getAddPriv()) array_push($actions, array('name'=>'copy','type'=>'submit', 'options'=>array('class'=>'save_button', 'onclick'=>"action_type.value=this.value")));
     if ($acl->getRemovePriv()) {
         array_push($actions, array('name' => 'delete', 'url' => 'member_type/delete?id=' . $member_type->getId(), 'color' => 'red'));
     }
     array_push($actions, array('name' => 'cancel', 'url' => 'member_type/list', 'color' => 'black'));
     $this->subtitle = $member_type->toString() . ' - id:' . $member_type->getId();
     $this->type = 'edit';
     $this->member_type = $member_type;
     $this->forward404Unless($this->member_type);
     $c = new Criteria();
     $this->member_jobs = MemberJobPeer::doSelect($c);
     foreach ($this->member_jobs as $member_job) {
         $c = new Criteria();
         $c->add(MemberJobPeer::PARENT, $member_job->getId());
         $c->add(MemberJobPeer::DISPLAY_MENU, true);
         $member_job->child = MemberJobPeer::doCount($c);
         $c = new Criteria();
         $c->add(MemberAclPeer::MEMBER_TYPE_ID, $this->member_type->getId(), Criteria::EQUAL);
         $c->add(MemberAclPeer::MEMBER_JOB_ID, $member_job->getId(), Criteria::EQUAL);
         $member_job->member_acl = MemberAclPeer::doSelectOne($c);
         $member_job->level = $member_job->getLevel();
         $member_job->order = $member_job->getMenuOrderRecursive();
     }
     function sortOrder($a, $b)
     {
         if ($a->order == $b->order) {
             return 0;
         }
         return $a->order < $b->order ? -1 : 1;
     }
     usort($this->member_jobs, 'sortOrder');
     $this->actions = $actions;
 }
开发者ID:taryono,项目名称:school,代码行数:49,代码来源:actions.class.php


示例13: getNumberOfJobs

 public function getNumberOfJobs()
 {
     $c = new Criteria();
     $c->add(JobPeer::PROJECT_ID, $this->getId());
     return JobPeer::doCount($c);
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:6,代码来源:Project.php


示例14: executeEdit

 public function executeEdit()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, $this->getModuleName());
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     if (!$acl) {
         $this->forward('default', 'error404');
     }
     $this->can_add = $acl->getAddPriv() == 1;
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $course_schedule = CourseSchedulePeer::retrieveByPK($this->getRequestParameter('course_id'));
     $this->forward404Unless($course_schedule);
     $course_schedule_id = $course_schedule->getId();
     $grade_options = array();
     $c = new Criteria();
     $c->add(SubjectGradingPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId(), Criteria::IN);
     $c->addAscendingOrderByColumn(SubjectGradingPeer::ID);
     $grades = SubjectGradingPeer::doSelect($c);
     foreach ($grades as $grade) {
         $grade_options[$grade->getId()] = $grade->getGradeComponent()->toString();
     }
     $this->grade_options = $grade_options;
     $class_agenda = ClassAgendaPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($class_agenda);
     $actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
     if ($acl->getRemovePriv()) {
         array_push($actions, array('name' => 'delete', 'url' => 'class_agenda/delete?id=' . $class_agenda->getId() . '&sched_id=' . $course_schedule->getId(), 'color' => 'red'));
     }
     array_push($actions, array('name' => 'cancel', 'url' => 'class_agenda/list?id=' . $course_schedule->getId(), 'color' => 'black'));
     $this->subtitle = $class_agenda->toString() . ' - id:' . $class_agenda->getId();
     $this->type = 'edit';
     $this->class_agenda = $class_agenda;
     $this->actions = $actions;
     $this->course_schedule_id = $class_agenda->getCourseScheduleId();
     $this->course_schedule = $course_schedule;
     $actions2 = array(array('name' => '<span>Jadwal Pelajaran</span>', 'url' => 'course_sched/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Agenda Kelas</span>', 'url' => 'class_agenda/list?id=' . $course_schedule->getId(), 'color' => 'sun', 'type' => 'direct'));
     $this->actions2 = $actions2;
 }
开发者ID:taryono,项目名称:school,代码行数:42,代码来源:actions.class.php


示例15: getJob

 /**
  * Get the associated Job object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Job The associated Job object.
  * @throws     PropelException
  */
 public function getJob(PropelPDO $con = null)
 {
     if ($this->aJob === null && $this->job_id !== null) {
         $c = new Criteria(JobPeer::DATABASE_NAME);
         $c->add(JobPeer::ID, $this->job_id);
         $this->aJob = JobPeer::doSelectOne($c, $con);
         /* The following can be used additionally to
         		   guarantee the related object contains a reference
         		   to this object.  This level of coupling may, however, be
         		   undesirable since it could result in an only partially populated collection
         		   in the referenced object.
         		   $this->aJob->addJobPhotographers($this);
         		 */
     }
     return $this->aJob;
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:23,代码来源:BaseJobPhotographer.php


示例16: doSelectJoinAll

 /**
  * Selects a collection of Delivery objects pre-filled with all related objects.
  *
  * @param      Criteria  $c
  * @param      PropelPDO $con
  * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  * @return     array Array of Delivery objects.
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function doSelectJoinAll(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 {
     foreach (sfMixer::getCallables('BaseDeliveryPeer:doSelectJoinAll:doSelectJoinAll') as $callable) {
         call_user_func($callable, 'BaseDeliveryPeer', $c, $con);
     }
     $c = clone $c;
     // Set the correct dbName if it has not been overridden
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     DeliveryPeer::addSelectColumns($c);
     $startcol2 = DeliveryPeer::NUM_COLUMNS - DeliveryPeer::NUM_LAZY_LOAD_COLUMNS;
     JobPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + (JobPeer::NUM_COLUMNS - JobPeer::NUM_LAZY_LOAD_COLUMNS);
     $c->addJoin(array(DeliveryPeer::JOB_ID), array(JobPeer::ID), $join_behavior);
     $stmt = BasePeer::doSelect($c, $con);
     $results = array();
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key1 = DeliveryPeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj1 = DeliveryPeer::getInstanceFromPool($key1))) {
             // We no longer rehydrate the object, since this can cause data loss.
             // See http://propel.phpdb.org/trac/ticket/509
             // $obj1->hydrate($row, 0, true); // rehydrate
         } else {
             $omClass = DeliveryPeer::getOMClass();
             $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
             $obj1 = new $cls();
             $obj1->hydrate($row);
             DeliveryPeer::addInstanceToPool($obj1, $key1);
         }
         // if obj1 already loaded
         // Add objects for joined Job rows
         $key2 = JobPeer::getPrimaryKeyHashFromRow($row, $startcol2);
         if ($key2 !== null) {
             $obj2 = JobPeer::getInstanceFromPool($key2);
             if (!$obj2) {
                 $omClass = JobPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj2 = new $cls();
                 $obj2->hydrate($row, $startcol2);
                 JobPeer::addInstanceToPool($obj2, $key2);
             }
             // if obj2 loaded
             // Add the $obj1 (Delivery) to the collection in $obj2 (Job)
             $obj2->addDelivery($obj1);
         }
         // if joined row not null
         $results[] = $obj1;
     }
     $stmt->closeCursor();
     return $results;
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:62,代码来源:BaseDeliveryPeer.php


示例17: executePaymentSlip

 public function executePaymentSlip()
 {
     $stu = StudentPeer::retrieveByPK($this->getRequestParameter('student_id'));
     $job = JobPeer::retrieveByCode($this->getModuleName());
     $academic_process = $job->getAcademicProcess();
     $this->forward404Unless($stu && $job && $academic_process);
     $c = new Criteria();
     $c->add(AcademicProcessPeer::CODE, $academic_process->getCode());
     $c->addJoin(AcademicProcessPeer::ID, AcademicCostPeer::ACADEMIC_PROCESS_ID);
     $c->addJoin(AcademicCostPeer::ACADEMIC_CALENDAR_ID, StudentLeavePeer::ACADEMIC_CALENDAR_ID);
     $c->add(StudentLeavePeer::STATUS, StudentLeave::STATUS_APPROVED);
     $c->add(StudentLeavePeer::STUDENT_ID, $stu->getId());
     $costs = AcademicCostPeer::doSelect($c);
     $total_cost = 0;
     foreach ($costs as $c) {
         $total_cost += $c->getAmount();
     }
     $this->stu = $stu;
     $this->costs = $costs;
     $this->total_cost = $total_cost;
     $this->setViewClass('sfDomPDF');
 }
开发者ID:taryono,项目名称:school,代码行数:22,代码来源:actions.class.php


示例18: executeEdit

 public function executeEdit()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $usertype = $this->getContext()->getUser()->getAttribute('usertype', null, 'bo');
     $jobtemplate = $this->getContext()->getUser()->getAttribute('job_template_id', null, 'bo');
     if ($jobtemplate == 1) {
         $c = new Criteria();
         $c->add(JobPeer::CODE, $this->getModuleName());
         $job = JobPeer::doSelectOne($c);
         $acl = AclPeer::retrieveByPK($group_id, $job->getId());
         if (!$acl) {
             $this->forward('default', 'error404');
         }
         $this->can_add = $acl->getAddPriv() == 1;
         $this->can_edit = $acl->getEditPriv() == 1;
         $this->can_remove = $acl->getRemovePriv() == 1;
         $byEmployee = false;
     } else {
         $c = new Criteria();
         $c->add(JobPeer::CODE, 'employee_leave_l');
         $job = JobPeer::doSelectOne($c);
         $acl = AclPeer::retrieveByPK($group_id, $job->getId());
         if (!$acl) {
             $this->forward('default', 'error404');
         }
         $this->can_add = $acl->getAddPriv() == 1;
         $this->can_edit = $acl->getEditPriv() == 1;
         $this->can_remove = $acl->getRemovePriv() == 1;
         $byEmployee = true;
     }
     $employee_leave = EmployeeLeavePeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($employee_leave);
     $actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
     if ($acl->getRemovePriv()) {
         array_push($actions, array('name' => 'delete', 'url' => 'employee_leave/delete?id=' . $employee_leave->getId(), 'color' => 'red'));
     }
     array_push($actions, array('name' => 'cancel', 'url' => 'employee_leave/list?employee_id=' . $employee_leave->getEmployeeId(), 'color' => 'white'));
     $this->subtitle = $employee_leave->toString() . ' - id:' . $employee_leave->getId();
     $this->type = 'edit';
     $this->employee_leave = $employee_leave;
     $this->actions = $actions;
     $employee = $employee_leave->getEmployee();
     if ($byEmployee == false) {
         $actions2 = array(array('name' => '<span>Catatan Kepegawaian</span>', 'url' => 'employee_list/list', 'color' => 'sky'));
         array_push($actions2, array('name' => '<span>Mutasi Jabatan</span>', 'url' => 'employee_job_history/list?employee_id=' . $employee->getId(), 'color' => 'sky'));
         array_push($actions2, array('name' => '<span>Absensi Pegawai</span>', 'url' => 'employee_absence/list?employee_id=' . $employee->getId(), 'color' => 'sky'));
         array_push($actions2, array('name' => '<span>Administrasi Cuti</span>', 'url' => 'employee_leave/list?employee_id=' . $employee->getId(), 'color' => 'sun', 'type' => 'direct'));
         array_push($actions2, array('name' => '<span>Administrasi Izin</span>', 'url' => 'employee_permit/list?employee_id=' . $employee->getId(), 'color' => 'sky'));
         array_push($actions2, array('name' => '<span>Administrasi Pengobatan</span>', 'url' => 'employee_medical/list?employee_id=' . $employee->getId(), 'color' => 'sky'));
         array_push($actions2, array('name' => '<span>Gaji Pegawai</span>', 'url' => 'employee_salary/list?employee_id=' . $employee->getId(), 'color' => 'sky'));
         $this->actions2 = $actions2;
     }
     $this->byEmployee = $byEmployee;
 }
开发者ID:taryono,项目名称:school,代码行数:54,代码来源:actions.class.php


示例19: executeEdit

 public function executeEdit()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, $this->getModuleName());
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     if (!$acl) {
         $this->forward('default', 'error404');
     }
     $this->can_add = $acl->getAddPriv() == 1;
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $cat_language = CatLanguagePeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($cat_language);
     $actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
     // if ($acl->getAddPriv()) array_push($actions, array('name'=>'copy','type'=>'submit', 'options'=>array('class'=>'save_button', 'onclick'=>"action_type.value=this.value")));
     if ($acl->getRemovePriv()) {
         array_push($actions, array('name' => 'delete', 'url' => 'cat_language/delete?id=' . $cat_language->getId(), 'color' => 'red'));
     }
     array_push($actions, array('name' => 'cancel', 'url' => 'cat_language/list', 'color' => 'black'));
     $this->subtitle = $cat_language->toString() . ' - id:' . $cat_language->getId();
     $this->type = 'edit';
     $this->cat_language = $cat_language;
     $this->actions = $actions;
 }
开发者ID:taryono,项目名称:school,代码行数:26,代码来源:actions.class.php


示例20: retrieveByPKs

 /**
  * Retrieve multiple objects by pkey.
  *
  * @param      array $pks List of primary keys
  * @param      PropelPDO $con the connection to use
  * @return Job[]
  * @throws PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function retrieveByPKs($pks, PropelPDO $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(JobPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(JobPeer::DATABASE_NAME);
         $criteria->add(JobPeer::ID, $pks, Criteria::IN);
         $objs = JobPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
开发者ID:Halfnhav4,项目名称:datawrapper,代码行数:24,代码来源:BaseJobPeer.php



注:本文中的JobPeer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP JobQueueGroup类代码示例发布时间:2022-05-23
下一篇:
PHP Job类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap