function _salesforce_mapping_get_sync_trigger_options in Salesforce Suite 7.3
Return form options for available sync triggers.
Return value
array Array of sync trigger options keyed by their machine name with their label as the value.
2 calls to _salesforce_mapping_get_sync_trigger_options()
- salesforce_mapping_form in modules/
salesforce_mapping/ includes/ salesforce_mapping.admin.inc - Return a form for a Salesforce mapping entity.
- _salesforce_mapping_get_default_value in modules/
salesforce_mapping/ includes/ salesforce_mapping.admin.inc - Helper to retrieve the current value for a given form field.
File
- modules/
salesforce_mapping/ includes/ salesforce_mapping.admin.inc, line 1153 - Configuration page for creating and modifying a mapping.
Code
function _salesforce_mapping_get_sync_trigger_options() {
$options = array();
if (module_exists('salesforce_push')) {
$options += array(
SALESFORCE_MAPPING_SYNC_DRUPAL_CREATE => t('Drupal entity create'),
SALESFORCE_MAPPING_SYNC_DRUPAL_UPDATE => t('Drupal entity update'),
SALESFORCE_MAPPING_SYNC_DRUPAL_DELETE => t('Drupal entity delete'),
);
}
if (module_exists('salesforce_pull')) {
$options += array(
SALESFORCE_MAPPING_SYNC_SF_CREATE => t('Salesforce object create'),
SALESFORCE_MAPPING_SYNC_SF_UPDATE => t('Salesforce object update'),
SALESFORCE_MAPPING_SYNC_SF_DELETE => t('Salesforce object delete'),
);
}
return $options;
}