本文整理汇总了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;
}
示例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());
}
}