case 'CRM_Event_Form_Registration_Confirm':
$form->controller = new CRM_Event_Controller_Registration();
break;
+
case 'CRM_Contact_Import_Form_DataSource':
+ case 'CRM_Contact_Import_Form_MapField':
+ case 'CRM_Contact_Import_Form_Preview':
$form->controller = new CRM_Contact_Import_Controller();
- break;
+ $form->controller->setStateMachine(new CRM_Core_StateMachine($form->controller));
+ // The submitted values should be set on one or the other of the forms in the flow.
+ // For test simplicity we set on all rather than figuring out which ones go where....
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['DataSource'] = $formValues;
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['MapField'] = $formValues;
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['Preview'] = $formValues;
+ return $form;
+
+ case 'CRM_Contribute_Import_Form_DataSource':
+ case 'CRM_Contribute_Import_Form_MapField':
+ case 'CRM_Contribute_Import_Form_Preview':
+ $form->controller = new CRM_Contribute_Import_Controller();
+ $form->controller->setStateMachine(new CRM_Core_StateMachine($form->controller));
+ // The submitted values should be set on one or the other of the forms in the flow.
+ // For test simplicity we set on all rather than figuring out which ones go where....
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['DataSource'] = $formValues;
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['MapField'] = $formValues;
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['Preview'] = $formValues;
+ return $form;
+
+ case 'CRM_Member_Import_Form_DataSource':
+ case 'CRM_Member_Import_Form_MapField':
+ case 'CRM_Member_Import_Form_Preview':
+ $form->controller = new CRM_Member_Import_Controller();
+ $form->controller->setStateMachine(new CRM_Core_StateMachine($form->controller));
+ // The submitted values should be set on one or the other of the forms in the flow.
+ // For test simplicity we set on all rather than figuring out which ones go where....
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['DataSource'] = $formValues;
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['MapField'] = $formValues;
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['Preview'] = $formValues;
+ return $form;
+
+ case 'CRM_Event_Import_Form_DataSource':
+ case 'CRM_Event_Import_Form_MapField':
+ case 'CRM_Event_Import_Form_Preview':
+ $form->controller = new CRM_Event_Import_Controller();
+ $form->controller->setStateMachine(new CRM_Core_StateMachine($form->controller));
+ // The submitted values should be set on one or the other of the forms in the flow.
+ // For test simplicity we set on all rather than figuring out which ones go where....
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['DataSource'] = $formValues;
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['MapField'] = $formValues;
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['Preview'] = $formValues;
+ return $form;
+
+ case 'CRM_Activity_Import_Form_DataSource':
+ case 'CRM_Activity_Import_Form_MapField':
+ case 'CRM_Activity_Import_Form_Preview':
+ $form->controller = new CRM_Activity_Import_Controller();
+ $form->controller->setStateMachine(new CRM_Core_StateMachine($form->controller));
+ // The submitted values should be set on one or the other of the forms in the flow.
+ // For test simplicity we set on all rather than figuring out which ones go where....
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['DataSource'] = $formValues;
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['MapField'] = $formValues;
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['Preview'] = $formValues;
+ return $form;
+
+ case 'CRM_Custom_Import_Form_DataSource':
+ case 'CRM_Custom_Import_Form_MapField':
+ case 'CRM_Custom_Import_Form_Preview':
+ $form->controller = new CRM_Custom_Import_Controller();
+ $form->controller->setStateMachine(new CRM_Core_StateMachine($form->controller));
+ // The submitted values should be set on one or the other of the forms in the flow.
+ // For test simplicity we set on all rather than figuring out which ones go where....
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['DataSource'] = $formValues;
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['MapField'] = $formValues;
+ $_SESSION['_' . $form->controller->_name . '_container']['values']['Preview'] = $formValues;
+ return $form;
case strpos($class, '_Form_') !== FALSE:
$form->controller = new CRM_Core_Controller_Simple($class, $pageName);