function salesforce_api_fieldmap_object_label in Salesforce Suite 7.2
Same name and namespace in other branches
- 5.2 salesforce_api/salesforce_api.module \salesforce_api_fieldmap_object_label()
- 6.2 salesforce_api/salesforce_api.module \salesforce_api_fieldmap_object_label()
- 7 salesforce_api/salesforce_api.module \salesforce_api_fieldmap_object_label()
Returns the label for the object of the specified type and name. Note that both the $type and $entity parameters will be 'salesforce' in the case of Salesforce objects.
Parameters
$type:
$entity:
$bundle:
Return value
string The label for the object.
8 calls to salesforce_api_fieldmap_object_label()
- salesforce_api_fieldmap_description in salesforce_api/
salesforce_api.module - Returns a string of description text for the specified fieldmap.
- salesforce_api_fieldmap_options in salesforce_api/
salesforce_api.module - Returns an array of fieldmaps for use as options in the Forms API.
- sf_entity_salesforce_form in sf_entity/
sf_entity.module - Displays the Salesforce synchronization form.
- sf_import_create in sf_import/
sf_import.admin.inc - Page callback for admin/config/salesforce/import/create
- sf_prematch_delete_form in sf_prematch/
sf_prematch.admin.inc - @todo Please document this function.
File
- salesforce_api/
salesforce_api.module, line 999 - Defines an API that enables modules to interact with the Salesforce server.
Code
function salesforce_api_fieldmap_object_label($type, $entity, $bundle) {
// Get the object definition.
$object = salesforce_api_fieldmap_objects_load($type, $entity, $bundle);
// If no label is specified, return the object name.
if (!isset($object['label']) && isset($object['fields']['name'])) {
return check_plain($object['fields']['name']['label']);
}
return $object['label'];
}