function acquia_lift_campaign_type_create_form_submit in Acquia Lift Connector 7
Submit handler to create a campaign from the Acquia Lift UI flow.
File
Code
function acquia_lift_campaign_type_create_form_submit($form, &$form_state) {
module_load_include('inc', 'personalize', 'personalize.admin');
$agent_data = _personalize_agent_from_form_values($form_state['values']['agent_basic_info']);
$agent_data->data['cache_decisions'] = $form_state['values']['cache_decisions'];
$agent = personalize_agent_save($agent_data);
personalize_set_campaign_context($agent->machine_name);
// @todo find out how to remove this in favor of asynchronous processing.
acquia_lift_process_queue(FALSE);
}