function _sf_node_export_cck_todate in Salesforce Suite 7
Same name and namespace in other branches
- 5.2 sf_node/sf_node.module \_sf_node_export_cck_todate()
File
- sf_entity/
sf_entity.module, line 375 - Integrates fieldable entities with the Salesforce API.
Code
function _sf_node_export_cck_todate($node, $fieldname, $drupal_field_definition, $sf_field_definition) {
// Get the name of the actual CCK field.
// drupal_* string functions are not necessary since these are machine names.
$key = substr($fieldname, 0, strlen($fieldname) - 7);
// Get the data array for the field.
$data = $node->{$key};
// Return the to date from the field data.
return $data[0]['value2'];
}