function salesforce_api_admin_object_submit in Salesforce Suite 7.2
Same name and namespace in other branches
- 6.2 salesforce_api/salesforce_api.admin.inc \salesforce_api_admin_object_submit()
- 7 salesforce_api/salesforce_api.admin.inc \salesforce_api_admin_object_submit()
FAPI submit handler Gather enabled SF Objects and rebuild the cache.
File
- salesforce_api/
salesforce_api.admin.inc, line 1279 - Contains the admin page callbacks for the Salesforce module, including forms for general settings and fieldmap administration.
Code
function salesforce_api_admin_object_submit($form, &$form_state) {
$values = $form_state['values']['objects'];
// Start off with all the Salesforce object types already in use.
$real_types = $form['disabled_types']['#value'];
foreach ($values as $i => $t) {
if (empty($t)) {
continue;
}
$real_types[$i] = $t;
}
if (empty($real_types)) {
$real_types = array();
}
$sf_objects = variable_set('salesforce_api_enabled_objects', array_filter(array_values($real_types)));
$objects = salesforce_api_cache_build();
return;
}