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

PHP I2CE_FormFactory类代码示例

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

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



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

示例1: action

 /**
  * Perform the main actions of the page.
  */
 public function action()
 {
     parent::action();
     $factory = I2CE_FormFactory::instance();
     $this->template->setAttribute("class", "active", "menuDashboard", "a[@href='dashboard']");
     $this->template->appendFileById("menu_dashboard.html", "ul", "menuDashboard");
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:10,代码来源:iHRIS_ManagePageDashboard.php


示例2: loadObjects

 protected function loadObjects()
 {
     $factory = I2CE_FormFactory::instance();
     if ($this->isPost()) {
         $dataelement = $factory->createContainer('dataelement');
         if (!$dataelement instanceof iHRIS_DataElement) {
             I2CE::raiseError("Could not create Data Element form");
             return;
         }
         $dataelement->load($this->post);
     } else {
         if ($this->get_exists('id')) {
             $id = $this->get('id');
             if (strpos($id, '|') === false) {
                 I2CE::raiseError("Depcreated use of id variable");
                 $id = 'dataelement|' . $id;
             }
         } else {
             $id = 'dataelement|0';
         }
         $dataelement = $factory->createContainer($id);
         if (!$dataelement instanceof iHRIS_DataElement) {
             I2CE::raiseError("Could not create valid Data Element form from id:{$id}");
             return;
         }
         $dataelement->populate();
         $dataelement->load($this->request());
     }
     $this->setObject($dataelement);
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:30,代码来源:iHRIS_PageFormDataElement.php


示例3: action

 /**
  * Perform the actions of this page.
  * @return boolean
  */
 protected function action()
 {
     if (parent::action()) {
         $next_month = getdate(mktime(0, 0, 0, $this->month + 1, 1, $this->year));
         $db_start = sprintf('%04d-%02d-%02d', $this->year, $this->month, 1);
         $db_end = sprintf('%04d-%02d-%02d', $next_month['year'], $next_month['mon'], $next_month['mday']);
         $find_instances = array('operator' => 'OR', 'operand' => array(0 => array('operator' => 'AND', 'operand' => array(0 => array('operator' => 'FIELD_LIMIT', 'style' => 'greaterthan_equals', 'field' => 'start_date', 'data' => array('value' => $db_start)), 1 => array('operator' => 'FIELD_LIMIT', 'style' => 'lessthan', 'field' => 'start_date', 'data' => array('value' => $db_end)))), 1 => array('operator' => 'AND', 'operand' => array(0 => array('operator' => 'FIELD_LIMIT', 'style' => 'greaterthan_equals', 'field' => 'end_date', 'data' => array('value' => $db_start)), 1 => array('operator' => 'FIELD_LIMIT', 'style' => 'lessthan', 'field' => 'end_date', 'data' => array('value' => $db_end))))));
         $instances = I2CE_FormStorage::search("scheduled_training_course", false, $find_instances);
         $factory = I2CE_FormFactory::instance();
         $month_end = new DateTime($db_end);
         $deviation = 35;
         $base = array(70, 116, 149);
         foreach ($instances as $instance) {
             $rgb = array();
             foreach ($base as $idx => $num) {
                 $rgb[$idx] = rand($num - $deviation, $num + $deviation);
             }
             $inst = $factory->createContainer("scheduled_training_course|{$instance}");
             $inst->populate();
             $this->addForm($inst, $inst->start_date->getDateTimeObj(), $inst->end_date->getDateTimeObj(), 'calendar_training_course_day.html', $rgb);
         }
     } else {
         return false;
     }
     return true;
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:30,代码来源:iHRIS_PageCalendarTraining.php


示例4: __construct

 /**
  * Create a new instance of a page.
  * 
  * The default constructor should be called by any pages extending this object.  It creates the
  * {@link I2CE_Template} and {@link I2CE_User} objects and sets up the basic member variables.
  * @param array $args
  * @param array $request_remainder The remainder of the request path
  */
 public function __construct($args, $request_remainder, $get = null, $post = null)
 {
     parent::__construct($args, $request_remainder, $get, $post);
     $this->form_factory = I2CE_FormFactory::instance();
     $this->check_map = I2CE_ModuleFactory::instance()->isEnabled("Lists");
     $this->locale = I2CE_Locales::DEFAULT_LOCALE;
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:15,代码来源:I2CE_Page_FormDocumentor.php


示例5: action

 /**
  * Perform the main actions of the page.
  * @return boolean
  */
 protected function action()
 {
     if (!parent::action()) {
         return false;
     }
     if (!$this->hasPermission("task(person_can_edit_child_form_person_instance)")) {
         $this->userMessage("You do not have permission to edit participants for this instance.");
         return false;
     }
     if (!$this->get_exists('person') || !$this->get_exists('instance')) {
         $this->template->addFile('action_participants_error.html');
         return true;
     }
     $person_instance = $this->getPersonInstance($this->get('person'), $this->get('instance'));
     $piObj = I2CE_FormFactory::instance()->createContainer("person_instance|" . $person_instance);
     if ($person_instance) {
         $piObj->populate();
         if ($piObj->attending == 0) {
             $piObj->attending = 1;
             $this->template->addFile("action_participants_add.html");
         } else {
             $piObj->attending = 0;
             $this->template->addFile("action_participants_remove.html");
         }
     } else {
         $piObj->setParent($this->get('person'));
         $piObj->getField('provider_instance')->setFromDB($this->get('instance'));
         $piObj->getField('attending')->setFromDB(1);
         $this->template->addFile("action_participants_add.html");
     }
     return $piObj->save($this->user);
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:36,代码来源:iHRIS_PageActionParticipants.php


示例6: loadObjects

 protected function loadObjects()
 {
     if (!$this->hasPermission("task(can_schedule_students_course_enrollment)") or $this->getUser()->role == "admin") {
         $this->setRedirect("noaccess");
     }
     $factory = I2CE_FormFactory::instance();
     $username = $this->getUser()->username;
     $training_institution = IHS_PageFormLecturer::fetch_institution($username);
     $where = array("operator" => "FIELD_LIMIT", "field" => "training_institution", "style" => "equals", "data" => array("value" => $training_institution));
     $fields = I2CE_FormStorage::search("schedule_course_enrollment", false, $where);
     foreach ($fields as $id) {
         //do nothing
     }
     if ($id) {
         $form = "schedule_course_enrollment|" . $id;
     } else {
         $form = "schedule_course_enrollment";
     }
     $courseEnrObj = $factory->createContainer($form);
     $courseEnrObj->populate();
     if ($this->isPost()) {
         $courseEnrObj->load($this->post);
     }
     $courseEnrObj->getField("training_institution")->setFromDB($training_institution);
     $this->setObject($courseEnrObj);
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:26,代码来源:iHRIS_PageForm_ScheduleCourseEnrollment.php


示例7: ensureLimits

 protected function ensureLimits()
 {
     if ($this->ensured) {
         return;
     }
     if ($this->storage->is_scalar()) {
         return false;
     }
     if (!$this->parent instanceof I2CE_Swiss_CustomReports_Report_ReportingForm_Field) {
         return false;
     }
     $factory = I2CE_FormFactory::instance();
     $formName = $this->parent->getForm();
     $formObj = $factory->createForm($formName);
     if (!$formObj instanceof I2CE_Form) {
         I2CE::raiseError("Could not instantiate the form {$formName}  at " . $this->configPath);
         return false;
     }
     $field = $this->parent->getName();
     $allowed_limits = $formObj->getLimitStyles($field);
     $excludes = I2CE::getConfig()->getAsArray("/modules/CustomReports/limit_excludes/displayed");
     foreach ($allowed_limits as $limit => $data) {
         if (in_array($limit, $excludes)) {
             continue;
         }
         $swissLimit = $this->getChild($limit, true);
         if (is_array($data) && count($data) == 1 && in_array('value', $data)) {
             $swissLimit->setAllowPivot(true);
         } else {
             $swissLimit->setAllowPivot(false);
         }
     }
     $this->ensured = true;
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:34,代码来源:I2CE_Swiss_CustomReports_Report_ReportingForm_Field_Limits.php


示例8: loadObjects

 /**
  * Create and load data for the objects used for this form.
  * 
  * Create the list object and if this is a form submission load
  * the data from the form data.
  */
 protected function loadObjects()
 {
     $factory = I2CE_FormFactory::instance();
     if ($this->isPost()) {
         $trainingprovider = $factory->createContainer('trainingprovider');
         if (!$trainingprovider instanceof iHRIS_TrainingProvider) {
             I2CE::raiseError("Could not create trainingprovider form");
             return;
         }
         $trainingprovider->load($this->post);
         $name_ignore = $trainingprovider->getField('name_ignore');
         $ignore_path = array('forms', 'trainingprovider', $trainingprovider->getID(), 'ignore', 'name');
         if ($name_ignore instanceof I2CE_FormField && $this->post_exists($ignore_path)) {
             $name_ignore->setFromPost($this->post($ignore_path));
         }
     } else {
         if ($this->get_exists('id')) {
             $id = $this->get('id');
             if (strpos($id, '|') === false) {
                 I2CE::raiseError("Depcreated use of id variable");
                 $id = 'trainingprovider|' . $id;
             }
         } else {
             $id = 'trainingprovider|0';
         }
         $trainingprovider = $factory->createContainer($id);
         if (!$trainingprovider instanceof iHRIS_TrainingProvider) {
             I2CE::raiseError("Could not create valid trainingprovider form from id:{$id}");
             return;
         }
         $trainingprovider->populate();
     }
     $this->setObject($trainingprovider);
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:40,代码来源:iHRIS_PageFormTrainingProvider.php


示例9: noData

 protected function noData($contentNode)
 {
     if (!($noDataNode = $this->template->appendFileByNode("customReports_notfound.html", 'div', $contentNode)) instanceof DOMNode) {
         return;
     }
     $link = '';
     if (!$this->config->setIfIsSet($link, 'create_link') || !$link) {
         return;
     }
     $createNode = $this->template->addFile("customReports_notfound_create.html", 'div', $noDataNode);
     if (!$createNode instanceof DOMNode) {
         return;
     }
     if (!($linkNode = $this->template->getElementByName('create_form_link', 0)) instanceof DOMNode) {
         return;
     }
     $this->template->addHeaderLink('create_from_limits.js');
     $rel = $this->reportObj->getFormRelationship();
     $form = $rel->getPrimaryForm();
     if (!($formObj = I2CE_FormFactory::instance()->createContainer($form)) instanceof I2CE_Form) {
         return;
     }
     $form_name = $formObj->getDisplayName();
     $js = 'createFormFromSearch(this,"' . $form . '");';
     $linkNode->setAttribute('onClick', $js);
     $this->template->setDisplayData('has_create_data', 1, $createNode);
     $this->template->setDisplayData('create_form_link', $link, $createNode);
     $this->template->setDisplayData('create_form_name', $form_name, $createNode);
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:29,代码来源:I2CE_CustomReport_Display_Default.php


示例10: action

 /**
  * Perform the main actions of the page.
  */
 protected function action()
 {
     $factory = I2CE_FormFactory::instance();
     $this->template->setAttribute("class", "active", "menuConfigure", "a[@href='configure']");
     $this->template->appendFileById("menu_configure.html", "ul", "menuConfigure");
     parent::action();
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:10,代码来源:iHRIS_PageConfigure.php


示例11: loadObjects

 /**
  * Create and load data for the objects used for this form.
  * 
  * Create the list object and if this is a form submission load
  * the data from the form data.
  */
 protected function loadObjects()
 {
     $factory = I2CE_FormFactory::instance();
     if ($this->isPost()) {
         $person = $factory->createContainer('person');
         if (!$person instanceof iHRIS_Person) {
             I2CE::raiseError("Could not create person form");
             return;
         }
         $person->load($this->post);
         $surname_ignore = $person->getField('surname_ignore');
         $ignore_path = array('forms', 'person', $person->getID(), 'ignore', 'surname');
         if ($surname_ignore instanceof I2CE_FormField && $this->post_exists($ignore_path)) {
             $surname_ignore->setFromPost($this->post($ignore_path));
         }
     } else {
         if ($this->get_exists('id')) {
             $id = $this->get('id');
             if (strpos($id, '|') === false) {
                 I2CE::raiseError("Depcreated use of id variable");
                 $id = 'person|' . $id;
             }
         } else {
             $id = 'person|0';
         }
         $person = $factory->createContainer($id);
         if (!$person instanceof iHRIS_Person) {
             I2CE::raiseError("Could not create valid person form from id:{$id}");
             return;
         }
         $person->populate();
         $person->load($this->request());
     }
     $this->setObject($person, I2CE_PageForm::EDIT_PRIMARY, null, true);
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:41,代码来源:iHRIS_PageFormPerson.php


示例12: action

 protected function action()
 {
     if (!parent::action()) {
         return false;
     }
     I2CE::raiseError("aremaC <- sthgiL");
     if (!is_scalar($search_form = array_shift($this->request_remainder)) || !($search_obj = I2CE_FormFactory::instance()->createContainer($search_form)) instanceof CSD_SearchMatches || (!($matches = $search_obj->getField('matches'))) instanceof I2CE_FormField_ASSOC_MAP_RESULTS) {
         return false;
     }
     I2CE::raiseError(print_r($this->request(), true));
     if (($maxField = $search_obj->getField('max')) instanceof I2CE_FormField_INT) {
         if ($maxField->getValue() > 200) {
             $maxField->setValue(200);
         }
     }
     $search_obj->load($this->post, false, false);
     I2CE::raiseError($search_obj->getXMLRepresentation(false));
     $search_obj->setID("1");
     //so it will populate
     $search_obj->populate(true);
     if (count($results = $matches->getValue()) > 200) {
         return false;
         I2CE::raiseError("Too many results");
     }
     $this->data['length'] = count($results);
     $this->data['data'] = $results;
     I2CE::raiseError("REQ=" . print_r($this->request(), true));
     $this->data = array($this->data);
     I2CE::raiseError(print_r($this->data, true));
     return true;
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:31,代码来源:CSD_WebServices_Search.php


示例13: loadPrimaryObject

 /**
  * Set up the main object for this page as well as the training provider.
  */
 protected function loadPrimaryObject()
 {
     $this->factory = I2CE_FormFactory::instance();
     if (!$this->request_exists('id')) {
         $this->userMessage("Invalid Training Provider Requested");
         return false;
     }
     if ($this->request_exists('id')) {
         $id = $this->request('id');
         if (strpos($id, '|') === false) {
             I2CE::raiseError("Deprecated use of id variable");
             $id = 'trainingprovider|' . $id;
         }
     } else {
         $id = 'trainingprovider|0';
     }
     $this->mainObj = $this->factory->createContainer($id);
     $this->mainObj->populate();
     if (!$this->mainObj instanceof iHRIS_TrainingProvider && $this->mainObj->getParentID() != 0) {
         $provider = $this->factory->createContainer($this->mainObj->getParent());
         $provider->populate();
         $this->template->setForm($provider);
     }
     $this->template->setForm($this->mainObj);
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:28,代码来源:iHRIS_PageViewTrainingProvider.php


示例14: validate_form_reschedule_course

 public function validate_form_reschedule_course($form)
 {
     $semester = implode("|", $form->new_semester);
     $course = implode("|", $form->training);
     $academic_year = implode("|", $form->academic_year);
     $username = $this->getUser()->username;
     $training_institution = iHRIS_PageFormLecturer::fetch_institution($username);
     $where = array("operator" => "AND", "operand" => array(0 => array("operator" => "FIELD_LIMIT", "field" => "academic_year", "style" => "equals", "data" => array("value" => $academic_year)), 1 => array("operator" => "FIELD_LIMIT", "field" => "training", "style" => "equals", "data" => array("value" => $course)), 2 => array("operator" => "FIELD_LIMIT", "field" => "training_institution", "style" => "equals", "data" => array("value" => $training_institution))));
     $is_rescheduled = I2CE_FormStorage::search("reschedule_course", false, $where);
     if (count($is_rescheduled) > 0) {
         $form->setInvalidMessage("training", "This Course Already Rescheduled For This Semester In This Academic Year");
     }
     $ff = I2CE_FormFactory::instance();
     if (!($courseObj = $ff->createContainer($course)) instanceof iHRIS_Training) {
         return;
     }
     $courseObj->populate();
     $crs_semester = $courseObj->getField("semester")->getDBValue();
     if ($crs_semester == $semester) {
         $form->setInvalidMessage("new_semester", "This Course Is Currently Offered In This Semester");
         return;
     }
     $sem = $form->new_semester[1];
     $crs_semester = explode("|", $crs_semester);
     $crs_semester = $crs_semester[1];
     if ($crs_semester > $sem or $sem - $crs_semester != 1) {
         $form->setInvalidMessage("new_semester", "A Course Must Be Rescheduled To A Next Semester");
     }
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:29,代码来源:iHRIS_Module_RescheduleCourse.php


示例15: action

 /**
  * Handle the actions for the page.
  * @return boolean
  */
 protected function action()
 {
     if (!$this->get_exists('id')) {
         $this->template->addFile("user_alerts_acknowledge_invalid.html");
         return true;
     } else {
         $user_alert = I2CE_FormFactory::instance()->createContainer($this->get('id'));
         if (!$user_alert instanceof iHRIS_UserAlert) {
             $this->template->addFile("user_alerts_acknowledge_invalid.html");
             return true;
         }
         $user_alert->populate();
         $user = $this->getUser();
         if (!$user_alert->getParentId()) {
             $this->template->addFile("user_alerts_acknowledge_invalid.html");
             return true;
         }
         if ($user_alert->getParentId() != $user->username && !$this->hasPermission("task(user_alerts_edit_all)")) {
             $this->template->addFile("user_alerts_acknowledge_perms.html");
             return true;
         }
         if ($user_alert->time_ack->equals(I2CE_Date::blank())) {
             $user_alert->time_ack = I2CE_Date::now();
             $user_alert->save($user);
         }
         if (array_key_exists('HTTP_REFERER', $_SERVER)) {
             $this->setRedirect($_SERVER['HTTP_REFERER']);
         } else {
             $this->setRedirect("view_alerts");
         }
     }
     return true;
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:37,代码来源:iHRIS_PageAckUserAlerts.php


示例16: loadObjects

 /**
  * Load the history object for this page.
  */
 protected function loadObjects()
 {
     $factory = I2CE_FormFactory::instance();
     $this->history = $factory->createContainer($this->get('id'));
     $this->history->populate();
     $this->template->setForm($this->history);
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:10,代码来源:iHRIS_PageHistoryTrainingProvider.php


示例17: loadObjects

 protected function loadObjects()
 {
     $factory = I2CE_FormFactory::instance();
     if ($this->isPost()) {
         $dataset = $factory->createContainer('dataset');
         if (!$dataset instanceof iHRIS_DataSet) {
             I2CE::raiseError("Could not create Data Set form");
             return;
         }
         $dataset->load($this->post);
         //$surname_ignore = $person->getField('surname_ignore');
         //$ignore_path = array('forms','person',$person->getID(),'ignore','surname');
         //            if ($surname_ignore instanceof I2CE_FormField && $this->post_exists($ignore_path)) {
         //                $surname_ignore->setFromPost($this->post($ignore_path));
         //            }
     } else {
         if ($this->get_exists('id')) {
             $id = $this->get('id');
             if (strpos($id, '|') === false) {
                 I2CE::raiseError("Depcreated use of id variable");
                 $id = 'dataset|' . $id;
             }
         } else {
             $id = 'dataset|0';
         }
         $dataset = $factory->createContainer($id);
         if (!$dataset instanceof iHRIS_DataSet) {
             I2CE::raiseError("Could not create valid Data Set form from id:{$id}");
             return;
         }
         $dataset->populate();
         $dataset->load($this->request());
     }
     $this->setObject($dataset);
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:35,代码来源:iHRIS_PageFormDataSet.php


示例18: save

 /**
  * Check for duplicates and save the user alert
  * @param I2CE_User $user
  * @param boolean $transact
  * @return boolean
  */
 public function save($user, $transact = true)
 {
     if ($this->getId() === '0') {
         $find_duplicates = array('operator' => 'AND', 'operand' => array(array('operator' => 'FIELD_LIMIT', 'field' => 'message', 'style' => 'lowerequals', 'data' => array('value' => strtolower($this->message))), array('operator' => 'FIELD_LIMIT', 'field' => 'time_ack', 'style' => 'null'), array('operator' => 'FIELD_LIMIT', 'field' => 'alert_type', 'style' => 'equals', 'data' => array('value' => $this->alert_type))));
         if ($this->link == '') {
             $find_duplicates['operand'][] = array('operator' => 'FIELD_LIMIT', 'field' => 'link', 'style' => 'null');
         } else {
             $find_duplicates['operand'][] = array('operator' => 'FIELD_LIMIT', 'field' => 'link', 'style' => 'equals', 'data' => array('value' => $this->link));
         }
         if ($this->link_text == '') {
             $find_duplicates['operand'][] = array('operator' => 'FIELD_LIMIT', 'field' => 'link_text', 'style' => 'null');
         } else {
             $find_duplicates['operand'][] = array('operator' => 'FIELD_LIMIT', 'field' => 'link_text', 'style' => 'lowerequals', 'data' => array('value' => strtolower($this->link_text)));
         }
         $found = I2CE_FormStorage::search('user_alert', $this->getParent(), $find_duplicates, array("-time_sent"), 1);
         if ($found) {
             I2CE::raiseMessage("found duplicates so increasing repeats. {$found}");
             $duplicate = I2CE_FormFactory::instance()->createContainer("user_alert|" . $found);
             $duplicate->populate();
             $duplicate->repeated++;
             return $duplicate->save($user, $transact);
         }
     }
     return parent::save($user, $transact);
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:31,代码来源:iHRIS_UserAlert.php


示例19: action

 /**
  * Perform the main actions of the page.
  */
 protected function action()
 {
     parent::action();
     $person_id = 0;
     if ($this->get_exists('parent')) {
         $person_id = $this->get('parent');
     }
     $factory = I2CE_FormFactory::instance();
     $personForm = $factory->createContainer($person_id);
     if (!$personForm instanceof I2CE_Form) {
         return;
     }
     $personForm->populate();
     $this->setForm($personForm);
     $this->setDisplayData('person_id', 'id=' . $person_id);
     if ($this->get_exists('id')) {
         $competency_ids = array($this->get('id'));
     } else {
         $competency_ids = $personForm->getChildIds('person_competency');
     }
     $compAppendNode = $this->template->getElementById('comp_list');
     if (!$compAppendNode instanceof DOMNode) {
         return;
     }
     foreach ($competency_ids as $competency_id) {
         $compNode = $this->template->appendFileByNode("personal_competency_evaluation_history_comp_each.html", 'div', $compAppendNode);
         $compForm = $factory->createContainer('person_competency' . '|' . $competency_id);
         if (!$compForm instanceof I2CE_Form) {
             continue;
         }
         $compForm->populate();
         $this->setForm($compForm, $compNode);
         $competency = $factory->createContainer($compForm->getField("competency")->getDBValue());
         $competency->populate();
         $this->setForm($competency, $compNode);
         $appendNode = $this->template->getElementById('evaluation_list', $compNode);
         if (!$appendNode instanceof DOMNode) {
             return;
         }
         $fields = array('evaluation_date', 'competency_evaluation');
         $compForm->populateHistory($fields);
         $all_dates = array();
         foreach ($fields as $field) {
             while ($compForm->getField($field)->hasNextHistory()) {
                 $entry = $compForm->getField($field)->nextHistory();
                 $all_dates[$entry->date->dbFormat()][$field] = $entry;
             }
         }
         foreach ($all_dates as $entries) {
             $evalNode = $this->template->appendFileByNode("personal_competency_evaluation_history_each.html", 'tr', $appendNode);
             if (!$evalNode instanceof DOMNode) {
                 return;
             }
             foreach ($entries as $field => $entry) {
                 $this->template->setDisplayDataImmediate($field, $compForm->getField($field)->getDisplayValue($entry), $evalNode);
             }
         }
     }
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:62,代码来源:iHRIS_Page_Person_Competency_Evaluation_History.php


示例20: instance

 /**
  * Return the instance of this factory and create it if it doesn't exist.
  */
 public static function instance()
 {
     //function not needed when updating to php 5.3
     if (!self::$instance instanceof I2CE_FormFactory) {
         self::$instance = new I2CE_FormFactory();
     }
     return self::$instance;
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:11,代码来源:I2CE_FormFactory.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP I2CE_FormStorage类代码示例发布时间:2022-05-23
下一篇:
PHP I2CE类代码示例发布时间: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