Example #1
0
 /**
  * Creates wizard result step object
  *
  * @param		array				data
  * @param		RM_Wizard_Object	obWizard
  * @param 		RM_Account_iUser	obUser
  * @return		RM_Wizard_Result_Object
  **/
 public function createResultStep($data, RM_Wizard_Result_Object $obResult, RM_Wizard_Step $obStep)
 {
     $props = array();
     $props['data'] = serialize($data);
     $props['result_id'] = $obResult->id();
     $props['step_id'] = $obStep->id();
     return $this->_mapper->storage('resultstep')->createObject($props);
 }
Example #2
0
 /**
  * Returns answered step by result
  *
  * @param		RM_Wizard_Result_Object			obResult
  * @return		RM_Store_iRequest<RM_Wizard_Step>
  **/
 public function getStepsByResult(RM_Wizard_Result_Object $obResult)
 {
     $query = M('Db')->createQuery($this->_tables['resultstep'] . ' AS rs')->what('s.*')->join('rs', 'LEFT JOIN ' . $this->_tables['step'] . ' AS s ON s.id = rs.step_id')->where('rs.result_id = ?', $obResult->id())->order('order_id');
     return $this->_storages['step']->request($query);
 }