function acquia_lift_page_variation_rename_complete_callback in Acquia Lift Connector 7
Ctools form processing complete handler for the renaming of a page variation.
See also
acquia_lift_create_ctools_form().
1 string reference to 'acquia_lift_page_variation_rename_complete_callback'
- acquia_lift_page_variation_rename_modal_callback in ./
acquia_lift.admin.unibar.inc - Page callback to generate a page variation rename modal window.
File
Code
function acquia_lift_page_variation_rename_complete_callback($form, $form_state) {
$settings = array();
$option_sets = personalize_option_set_load_multiple(FALSE, array(
'decision_name' => $form_state['values']['variation_set_name'],
));
$option_set_settings = array_map('_personalize_convert_option_set_to_js_setting', $option_sets);
foreach ($option_set_settings as $option_set_setting) {
$settings[key($option_set_setting)] = reset($option_set_setting);
}
// We need to update the campaigns as well in case a campaign was paused by this action.
$campaign_settings['acquia_lift']['campaigns'] = acquia_lift_get_campaign_details(variable_get('acquia_lift_unibar_allow_status_change', TRUE));
$commands = array(
ctools_modal_command_dismiss(),
acquia_lift_command_messagebox(t('The variation has been renamed.'), 10),
acquia_lift_command_option_set_updates($settings),
ajax_command_settings($campaign_settings, TRUE),
acquia_lift_command_process_queue(),
);
return $commands;
}