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


PHP DaoFactory::StepInfo方法代码示例

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


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

示例1: perform

 /**
  * マスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // 初期化
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     $modal = $this->af->get('modal');
     //     	$step      	= $this->af->get( 'step' );
     $step_id = $this->af->get('step_id');
     $dao = DaoFactory::StepInfo();
     try {
         $params = array('company_id' => $company_id, 'user_id' => $user_id, 'UID' => $user_id, 'PGM' => get_class());
         if ($modal == '1') {
             if ($this->session->get('guide_modal') == '' || $this->session->get('guide_modal') == '0') {
                 $current_guide_modal = 'isnotGuide';
             } else {
                 $current_guide_modal = 'isGuide';
             }
             $this->session->set('guide_modal', 1);
             return array('json', array($current_guide_modal));
             // 					echo $this->session->get('guide_modal');
         } elseif ($modal == '0') {
             $this->session->set('guide_modal', '0');
             $dao->BeginTransaction();
             $dao->createAndResetCurrentStep($params);
             $dao->CommitTransaction();
         } elseif ($modal == '2') {
             //最初から始める バタンの機能
             $dao->BeginTransaction();
             $dao->createAndResetCurrentStep($params);
             $dao->CommitTransaction();
         } elseif ($step_id != '') {
             $params['step_id'] = $step_id;
             $dao->BeginTransaction();
             $dao->setCurrentStep($params);
             $dao->CommitTransaction();
         }
     } catch (Exception $e) {
         $dao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         //             return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:48,代码来源:Guidemodal.php

示例2: setGuideModal

 public function setGuideModal()
 {
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     //案内機能
     $s_guide_modal = $this->session->get('guide_modal');
     if ($s_guide_modal == '1') {
         $this->af->setApp('guide_modal', 'true');
     } else {
         $this->af->setApp('guide_modal', 'false');
     }
     $params = array('company_id' => $company_id, 'user_id' => $user_id);
     try {
         $dao = DaoFactory::StepInfo();
         $isExistGuideData = $dao->Retrieve('COMPANY_ID = ? AND USER_ID = ? ', $params);
         if (empty($isExistGuideData)) {
             $dao->BeginTransaction();
             $params['PGM'] = get_class();
             $params['UID'] = $user_id;
             $dao->createAndResetCurrentStep($params);
             $dao->CommitTransaction();
         }
         $guide_data = $dao->getStepInfo($params);
         $step_count = $dao->getStepCount();
         $pregress_with_step_id = $dao->getPregress($params);
         $num_current_step = 0;
         foreach ($pregress_with_step_id as $key => $value) {
             if ($value['STEP_ID'] == $guide_data[0]['STEP_ID']) {
                 $num_current_step = $key;
             }
         }
         $this->af->setApp('guide_data', $guide_data);
         $this->af->setApp('num_current_step', $num_current_step);
         $this->af->setApp('step_count', $step_count['STEP_COUNT'] - 1);
     } catch (Exception $e) {
         $dao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
     }
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:39,代码来源:ActionClass.php


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