private function SalesforceMappingFormCrudBase::getPullTriggerOptions in Salesforce Suite 8.4
Same name and namespace in other branches
- 5.0.x modules/salesforce_mapping_ui/src/Form/SalesforceMappingFormCrudBase.php \Drupal\salesforce_mapping_ui\Form\SalesforceMappingFormCrudBase::getPullTriggerOptions()
Return an array of Date fields suitable for use a pull trigger field.
Return value
array The options array.
1 call to SalesforceMappingFormCrudBase::getPullTriggerOptions()
- SalesforceMappingFormCrudBase::buildForm in modules/
salesforce_mapping_ui/ src/ Form/ SalesforceMappingFormCrudBase.php - Form constructor.
File
- modules/
salesforce_mapping_ui/ src/ Form/ SalesforceMappingFormCrudBase.php, line 511
Class
- SalesforceMappingFormCrudBase
- Salesforce Mapping Form base.
Namespace
Drupal\salesforce_mapping_ui\FormCode
private function getPullTriggerOptions() {
$options = [];
try {
$describe = $this
->getSalesforceObject();
} catch (\Exception $e) {
// No describe results means no datetime fields. We're done.
return [];
}
foreach ($describe
->getFields() as $field) {
if ($field['type'] == 'datetime') {
$options[$field['name']] = $field['label'];
}
}
return $options;
}