当前位置: 首页>>代码示例>>PHP>>正文


PHP sfI18N::setCulture方法代码示例

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


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

示例1: getDayString

 public function getDayString()
 {
     $context = sfContext::getInstance();
     $i18n = new sfI18N();
     $i18n->initialize($context);
     $i18n->setCulture($context->getUser()->getCulture());
     switch ($this->getDay()) {
         case '1':
             return $i18n->globalMessageFormat->format('_DAY_MONDAY_');
             break;
         case '2':
             return $i18n->globalMessageFormat->format('_DAY_TUESDAY_');
             break;
         case '3':
             return $i18n->globalMessageFormat->format('_DAY_WEDNESDAY_');
             break;
         case '4':
             return $i18n->globalMessageFormat->format('_DAY_THURSDAY_');
             break;
         case '5':
             return $i18n->globalMessageFormat->format('_DAY_FRIDAY_');
             break;
         case '6':
             return $i18n->globalMessageFormat->format('_DAY_SATURDAY_');
             break;
         case '7':
             return $i18n->globalMessageFormat->format('_DAY_SUNDAY_');
             break;
         default:
             return '-';
             break;
     }
 }
开发者ID:taryono,项目名称:school,代码行数:33,代码来源:CourseSchedule.php

示例2: executeUpdate

 public function executeUpdate()
 {
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $region = new Region();
     } else {
         $region = RegionPeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($region);
     }
     $region->setId($this->getRequestParameter('id'));
     $region->setName($this->getRequestParameter('name'));
     $region->setParent($this->getRequestParameter('parent'));
     $region->save();
     return $this->redirect('region/list');
 }
开发者ID:taryono,项目名称:school,代码行数:19,代码来源:actions.class.php

示例3: executeUpdate

 public function executeUpdate()
 {
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $cat_language = new CatLanguage();
     } else {
         $cat_language = CatLanguagePeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($cat_language);
     }
     $cat_language->setId($this->getRequestParameter('id'));
     $cat_language->setCode($this->getRequestParameter('code'));
     $cat_language->setName($this->getRequestParameter('name'));
     $cat_language->save();
     return $this->redirect('cat_language/list');
 }
开发者ID:taryono,项目名称:school,代码行数:19,代码来源:actions.class.php

示例4: executeUpdate

 public function executeUpdate()
 {
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $budget_status = new BudgetStatus();
     } else {
         $budget_status = BudgetStatusPeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($budget_status);
     }
     $budget_status->setId($this->getRequestParameter('id'));
     $budget_status->setCode($this->getRequestParameter('code'));
     $budget_status->setName($this->getRequestParameter('name'));
     $budget_status->save();
     return $this->redirect('budget_status/list');
 }
开发者ID:taryono,项目名称:school,代码行数:19,代码来源:actions.class.php

示例5: executeUpdate

 public function executeUpdate()
 {
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $payment_model = new PaymentModel();
     } else {
         $payment_model = PaymentModelPeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($payment_model);
     }
     $payment_model->setId($this->getRequestParameter('id'));
     $payment_model->setCode($this->getRequestParameter('code'));
     $payment_model->setName($this->getRequestParameter('name'));
     $payment_model->setParent($this->getRequestParameter('parent'));
     $payment_model->setDescription($this->getRequestParameter('description'));
     $payment_model->save();
     return $this->redirect('payment_model/list');
 }
开发者ID:taryono,项目名称:school,代码行数:21,代码来源:actions.class.php

示例6: executeUpdate

 public function executeUpdate()
 {
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $student = new Student();
     } else {
         $student = StudentPeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($student);
     }
     $student->setId($this->getRequestParameter('id'));
     $student->setCode($this->getRequestParameter('code'));
     $student->setName($this->getRequestParameter('name'));
     $student->setCurriculumId($this->getRequestParameter('curriculum_id'));
     $student->setClassGroupId($this->getRequestParameter('class_group_id'));
     $student->setClassName($this->getRequestParameter('class_name'));
     $student->setTestApplicantId($this->getRequestParameter('test_applicant_id'));
     $student->setStudentDetailId($this->getRequestParameter('student_detail_id'));
     $student->setStatus($this->getRequestParameter('status'));
     $student->save();
     return $this->redirect('alumni/list');
 }
开发者ID:taryono,项目名称:school,代码行数:25,代码来源:actions.class.php

示例7: executeUpdate

 public function executeUpdate()
 {
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $employee_leave = new EmployeeLeave();
     } else {
         $employee_leave = EmployeeLeavePeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($employee_leave);
     }
     $employee_leave->setId($this->getRequestParameter('id'));
     $employee_leave->setEmployeeId($this->getRequestParameter('employee_id'));
     if ($this->getRequestParameter('start')) {
         $employee_leave->setStart($this->getRequestParameter('start'));
     }
     if ($this->getRequestParameter('end')) {
         $employee_leave->setEnd($this->getRequestParameter('end'));
     }
     $employee = EmployeePeer::retrieveByPK($this->getRequestParameter('employee_id'));
     if ($employee) {
         $cd = new Criteria();
         $cd->add(EmployeeDetailPeer::EMPLOYEE_ID, $employee->getId());
         $employee_detail = EmployeeDetailPeer::doSelectOne($cd);
         if ($employee_detail->getEmployeeDivisionId()) {
             $employee_leave->setEmployeeDivisionId($employee_detail->getEmployeeDivisionId());
         }
         if ($employee->getDepartmentId()) {
             $employee_leave->setDepartmentId($employee->getDepartmentId());
         }
     }
     $employee_leave->setCode($this->getRequestParameter('code'));
     $employee_leave->setEmployeeLevelId($this->getRequestParameter('employee_level_id'));
     $employee_leave->setLeaveTypeId($this->getRequestParameter('leave_type_id'));
     $employee_leave->setLeaveLength($this->getRequestParameter('leave_length'));
     $employee_leave->setDetail($this->getRequestParameter('detail'));
     $employee_leave->setAddress($this->getRequestParameter('address'));
     $employee_leave->setStatus($this->getRequestParameter('status'));
     $employee_leave->setAcademicCalendarId($this->getRequestParameter('academic_calendar_id'));
     $employee_leave->save();
     return $this->redirect('employee_leave/list?employee_id=' . $this->getRequestParameter('employee_id'));
 }
开发者ID:taryono,项目名称:school,代码行数:44,代码来源:actions.class.php

示例8: executeSave

 public function executeSave()
 {
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $class_agenda = new ClassAgenda();
     } else {
         $class_agenda = ClassAgendaPeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($class_agenda);
     }
     $class_agenda->setId($this->getRequestParameter('id'));
     $class_agenda->setCourseScheduleId($this->getRequestParameter('course_schedule_id'));
     $class_agenda->setDetail($this->getRequestParameter('detail'));
     if ($this->getRequestParameter('date')) {
         $class_agenda->setDate($this->getRequestParameter('date'));
     }
     $class_agenda->setStatus($this->getRequestParameter('status'));
     $class_agenda->setSubjectGradingId($this->getRequestParameter('subject_grading_id'));
     $class_agenda->setMeetingPoint($this->getRequestParameter('meeting_point'));
     $class_agenda->setActionType($this->getRequestParameter('action_type'));
     $class_agenda->setDay($this->getRequestParameter('day'));
     if ($this->getRequestParameter('class_group_id')) {
         $class_agenda->setClassGroupId($this->getRequestParameter('class_group_id'));
     } else {
         $cs = CourseSchedulePeer::retrieveByPk($this->getRequestParameter('course_schedule_id'));
         $this->forward404Unless($cs);
         $class_agenda->setClassGroupId($cs->getClassGroupId());
     }
     $class_agenda->setDescription($this->getRequestParameter('description'));
     $class_agenda->save();
     #$params = array();
     #foreach (explode('&', $this->getRequestParameter('student_list_ser')) as $p) {
     #	$p = explode('=', $p);
     #	$params[rawurldecode($p[0])][] = rawurldecode($p[1]);
     #}
     #if (array_key_exists('students', $params)) {
     #	foreach ($params['students'] as $su_id) {
     #		$student_absence = new StudentAbsence();
     #
     #		$student_absence->setStudentId($su_id);
     #		$student_absence->setStart($this->getRequestParameter('date'));
     #		$student_absence->setEnd($this->getRequestParameter('date'));
     #		$student_absence->setAcademicCalendarId($class_agenda->getCourseSchedule()->getAcademicCalendarId());
     #		$student_absence->setClassGroupId($this->getRequestParameter('class_group_id'));
     #		$student_absence->save();
     #	}
     #}
     return $this->redirect('agenda/edit?id=' . $class_agenda->getId());
     #return $this->forward('agenda', 'list');
     #return $this->forward('agenda', 'edit?id='.$class_agenda->getId());
 }
开发者ID:taryono,项目名称:school,代码行数:57,代码来源:actions.class.php

示例9: executeUpdateSchedule

 public function executeUpdateSchedule()
 {
     $schedule = SchedulePeer::retrieveByPk($this->getRequestParameter('schedule_id'));
     $this->schedule = $schedule;
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $cs_detail = new ScheduleDetail();
     } else {
         $cs_detail = ScheduleDetailPeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($cs_detail);
     }
     $cs_detail->setId($this->getRequestParameter('id'));
     $cs_detail->setScheduleId($schedule->getId());
     $cs_detail->setDay($this->getRequestParameter('day'));
     $cs_detail->setClassSessionId($this->getRequestParameter('class_session_id'));
     $cs_detail->setLocationId($this->getRequestParameter('location_id'));
     $cs_detail->save();
     return $this->redirect('extracurricular/edit?id=' . $schedule->getId());
 }
开发者ID:taryono,项目名称:school,代码行数:23,代码来源:actions.class.php

示例10: executeSave

 public function executeSave()
 {
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     $params = array();
     foreach (explode('&', $this->getRequestParameter('month_list_ser')) as $p) {
         $p = explode('=', $p);
         $params[rawurldecode($p[0])][] = rawurldecode($p[1]);
     }
     if (array_key_exists('months', $params)) {
         foreach ($params['months'] as $month_id) {
             $payment_student = new PaymentJournal();
             $student = StudentPeer::retrieveByPK($this->getRequestParameter('student_id'));
             $c = new Criteria();
             $c->add(StudentTypePeer::STUDENT_ID, $student->getId());
             $stu_type = StudentTypePeer::doSelectOne($c);
             $cr = new Criteria();
             $cton1 = $cr->getNewCriterion(AcademicCostPeer::PAYER_TYPE_ID, $stu_type->getPayerTypeId(), Criteria::IN);
             $cton2 = $cr->getNewCriterion(AcademicCostPeer::ACADEMIC_PROCESS_ID, 2, Criteria::IN);
             $cton3 = $cr->getNewCriterion(AcademicCostPeer::ACADEMIC_CALENDAR_ID, $student->getAcademicCalendarId(), Criteria::IN);
             $cton4 = $cr->getNewCriterion(AcademicCostPeer::ACADEMIC_CALENDAR_ID, $student->getAcademicCalendar()->getParent(), Criteria::IN);
             $cton3->addOr($cton4);
             $cton2->addAnd($cton3);
             $cton1->addAnd($cton2);
             $cr->add($cton1);
             $ac_cost = AcademicCostPeer::doSelectOne($cr);
             $payment_student->setPayer($this->getRequestParameter('student_id'));
             $payment_student->setAcademicCostId($ac_cost->getId());
             $payment_student->setAcademicProcessId($ac_cost->getAcademicProcessId());
             $payment_student->setAmount($ac_cost->getAmount());
             $payment_student->setPaid($ac_cost->getAmount());
             $payment_student->setReceivable($ac_cost->getAmount() - $ac_cost->getAmount());
             $payment_student->setPaidAt($this->getRequestParameter('paid_at'));
             $payment_student->setPayerType(PaymentJournal::PAYER_TYPE_STUDENT);
             $payment_student->setPaymentModelId($this->getRequestParameter('payment_model_id'));
             $payment_student->setYear($this->getRequestParameter('year'));
             $payment_student->setMonth($month_id);
             $payment_student->setStatus('S');
             $payment_student->save();
             $amount_changed = $ac_cost->getAmount();
             if ($amount_changed != 0) {
                 $ph = new PaymentHistory();
                 $ph->setPaymentJournal($payment_student);
                 $ph->setAmount($amount_changed);
                 $ph->save();
             }
         }
     }
     return $this->redirect('payment_student/list');
     #return $this->forward('payment_student', 'preview?student_id='.$this->getRequestParameter('student_id').'&paid_at='.$this->getRequestParameter('paid_at').'&payment_model_id='.$this->getRequestParameter('payment_model_id').'&year='.$this->getRequestParameter('year'));
     #return $this->redirect('payment_student/preview?student_id='.$this->getRequestParameter('student_id').'&paid_at='.$this->getRequestParameter('paid_at').'&payment_model_id='.$this->getRequestParameter('payment_model_id').'&year='.$this->getRequestParameter('year'));
     #return $this->redirect('payment_student/list',
     #					    'before'=>"window.open('".$this->getController()->genUrl('/payment_student/printForm').
     #		  "?student_id='+$('student_id').value+'&paid_at='+$('paid_at').value+'&payment_model_id='+$('payment_model_id').value+'&year='+$('year').value,
     #								'link',
     #								'height=480,width=640,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=no'
     #								)")
 }
开发者ID:taryono,项目名称:school,代码行数:61,代码来源:actions.class.php

示例11: executeUpdate

 public function executeUpdate()
 {
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $counseling_spec = new CounselingSpec();
     } else {
         $counseling_spec = CounselingSpecPeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($counseling_spec);
     }
     $counseling_spec->setId($this->getRequestParameter('id'));
     $counseling_spec->setCode($this->getRequestParameter('code'));
     $counseling_spec->setParent($this->getRequestParameter('parent'));
     $counseling_spec->setDescription($this->getRequestParameter('description'));
     $counseling_spec->save();
     return $this->redirect('counseling_spec/list');
 }
开发者ID:taryono,项目名称:school,代码行数:20,代码来源:actions.class.php

示例12: executeSavePayment

 public function executeSavePayment()
 {
     #$user_id = $this->getContext()->getUser()->getAttribute('user_id', null, 'bo');
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     /**        
             $year = $this->getRequestParameter('year');
             $month = $this->getRequestParameter('month');
             
             $department = DepartmentPeer::retrieveByPK($this->getRequestParameter('department_id'));
             $dept_code = $department->getNumCode().'-';
             
             $code_appl = 'REG';
             $stu_code = ParamsPeer::retrieveByCode('applicant_code');
     
             $sc = $stu_code->getValue();
             $sc = explode('$', $sc);
             array_shift($sc);
             $code_len = 0;
             $code = '';
             foreach ($sc as $k => $v) {
                 $v = explode('#', $v);
                 if ($v[0] == 'app') {
                     $code_len += $v[1];
                     $code .= str_pad($code_appl, $v[1], '0', STR_PAD_LEFT);
                 } elseif ($v[0] == 'dept') {
                     $code .= str_pad($dept_code, $v[1], '0', STR_PAD_LEFT);
                     $code_len += $v[1];
                 } elseif ($v[0] == 'year') {
                     if (strlen($year) <= $v[1]) {
                         $code .= str_pad($year, $v[1], '0', STR_PAD_LEFT);
                     } else {
                         $code .= substr($year, strlen($year) - $v[1]);
                     }
                     $code_len += $v[1];
                 } elseif ($v[0] == 'month') {
                     if (strlen($month) <= $v[1]) {
                         $code .= str_pad($month, $v[1], '0', STR_PAD_LEFT);
                     } else {
                         $code .= substr($month, strlen($month) - $v[1]);
                     }
                     $code_len += $v[1];
                 } elseif ($v[0] == 'seq') {
                     $c = new Criteria();
                     $c->add(NgTestApplicantPeer::CODE, $code . '%', Criteria::LIKE);
                     $c->addDescendingOrderByColumn(NgTestApplicantPeer::CODE);
                     $c->setLimit(1);
                     $last_applicant = NgTestApplicantPeer::doSelectOne($c);
                     if ($last_applicant) {
                         $lap = $last_applicant->getCode();
                         $lap = substr_replace($lap, '', 0, $code_len);
                         $lap = substr($lap, 0, $v[1]);
                         $lap++;
                         $code .= str_pad($lap, $v[1], '0', STR_PAD_LEFT);
                     } else {
                         $code .= str_pad(1, $v[1], '0', STR_PAD_LEFT);
                         break;
                     }
                 }
                 $sc[$k] = $v;
             }
             **/
     $newCode = $this->pmbTools->generateApplicantCode(NgStatusApplicant::CONFIRMED, $this->getRequestParameter('department_id'));
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $ng_test_applicant = new NgTestApplicant();
     } else {
         $ng_test_applicant = NgTestApplicantPeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($ng_test_applicant);
     }
     $ng_test_applicant->setCode($newCode);
     $ng_test_applicant->setNgStatusApplicantId(NgStatusApplicant::CONFIRMED);
     $ng_test_applicant->save();
     $c = new Criteria();
     $c->add(NgRegTestPeriodPeer::NG_REG_PERIOD_ID, $ng_test_applicant->getNgRegTestPeriod()->getNgRegPeriodId());
     $nrtps = NgRegTestPeriodPeer::doSelect($c);
     foreach ($nrtps as $nrtp) {
         $cw = new Criteria();
         $cw->add(NgTestSchedulePeer::NG_REG_TEST_PERIOD_ID, $nrtp->getId());
         $cw->addAscendingorderByColumn(NgTestSchedulePeer::ID);
         $scheds = NgTestSchedulePeer::doSelect($cw);
         $s1 = array();
         foreach ($scheds as $s) {
             $s1[$s->getNgRegTestPeriodId()][] = array('ng_reg_test_period_id' => $s->getNgRegTestPeriodId(), 'used' => $s->countNgTestApplScheds(), 'capacity' => $s->getCapacity(), 'sched' => $s);
         }
         foreach ($s1 as $s) {
             $c = new Criteria();
             $c->add(NgTestSchedulePeer::NG_REG_TEST_PERIOD_ID, $nrtp->getId());
             $c->addJoin(TestApplSchedPeer::TEST_SCHEDULE_ID, TestSchedulePeer::ID);
             $c->add(NgTestApplSchedPeer::NG_TEST_APPLICANT_ID, $ng_test_applicant->getId());
             $tas = NgTestApplSchedPeer::doSelectOne($c);
             if ($tas == null) {
                 $i = 0;
                 while ($s[$i]) {
                     $sched = $s[$i];
                     if ($sched['used'] < $sched['capacity']) {
                         $tas = new NgTestApplSched();
                         $tas->setNgTestApplicant($ng_test_applicant);
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php

示例13: executeUpdate

 public function executeUpdate()
 {
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_i18n = $this->getRequestParameter('action_type');
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $expenditure_journal = new ExpenditureJournal();
     } else {
         $expenditure_journal = ExpenditureJournalPeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($expenditure_journal);
     }
     $expenditure_journal->setId($this->getRequestParameter('id'));
     $expenditure_journal->setAcademicCalendarId($this->getRequestParameter('academic_calendar_id'));
     $expenditure_journal->setAmount($this->getRequestParameter('amount'));
     //$expenditure_journal->setPaid($this->getRequestParameter('paid'));
     //$expenditure_journal->setReceivable($this->getRequestParameter('amount')-$this->getRequestParameter('paid'));
     //$expenditure_journal->setBiayaDesc($this->getRequestParameter('biaya_desc'));
     $expenditure_journal->setPaidAt($this->getRequestParameter('paid_at'));
     $expenditure_journal->setStatus($this->getRequestParameter('status'));
     $expenditure_journal->setBudget($this->getRequestParameter('budget'));
     $expenditure_journal->save();
     return $this->redirect('expenditure_journal/list');
 }
开发者ID:taryono,项目名称:school,代码行数:25,代码来源:actions.class.php

示例14: executeUpdate

 public function executeUpdate()
 {
     $student_id = $this->getRequestParameter('student_id');
     $student = StudentPeer::retrieveByPK($student_id);
     $this->forward404Unless($student);
     $this->student = $student;
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $alumni_work_history = new AlumniWorkHistory();
     } else {
         $alumni_work_history = AlumniWorkHistoryPeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($alumni_work_history);
     }
     $alumni_work_history->setId($this->getRequestParameter('id'));
     $alumni_work_history->setStudentId($this->getRequestParameter('student_id'));
     $alumni_work_history->setEmployeeType($this->getRequestParameter('employee_type'));
     $alumni_work_history->setCompanyName($this->getRequestParameter('company_name'));
     $alumni_work_history->setCompanyAddress($this->getRequestParameter('company_address'));
     $alumni_work_history->setCompanyPhone($this->getRequestParameter('company_phone'));
     $alumni_work_history->setCompanyFax($this->getRequestParameter('company_fax'));
     $alumni_work_history->setJobType($this->getRequestParameter('job_type'));
     $alumni_work_history->setWaitingTime($this->getRequestParameter('waiting_time'));
     $alumni_work_history->setSalary($this->getRequestParameter('salary'));
     $alumni_work_history->save();
     return $this->redirect('alumni_work_history/list?student_id=' . $student_id);
 }
开发者ID:taryono,项目名称:school,代码行数:30,代码来源:actions.class.php

示例15: executeSimpan

 public function executeSimpan()
 {
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $ng_test_schedule = new NgTestSchedule();
     } else {
         $ng_test_schedule = NgTestSchedulePeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($ng_test_schedule);
     }
     $this->ng_reg_period = NgRegPeriodPeer::retrieveByPK($this->getRequestParameter('ng_reg_period_id'));
     $this->forward404Unless($this->ng_reg_period);
     $ng_test_schedule->setId($this->getRequestParameter('id'));
     $ng_test_schedule->setTitle($this->getRequestParameter('title'));
     $ng_test_schedule->setLocationId($this->getRequestParameter('location_id'));
     $ng_test_schedule->setNgRegTestPeriodId($this->getRequestParameter('ng_reg_test_period_id'));
     if ($this->getRequestParameter('start')) {
         $ng_test_schedule->setStart($this->getRequestParameter('start'));
     }
     if ($this->getRequestParameter('end')) {
         $ng_test_schedule->setEnd($this->getRequestParameter('end'));
     }
     $ng_test_schedule->setCapacity($this->getRequestParameter('capacity'));
     $ng_test_schedule->save();
     return $this->redirect('ng_reg_detail/list?id=' . $this->ng_reg_period->getId());
 }
开发者ID:taryono,项目名称:school,代码行数:29,代码来源:actions.class.php


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