protected function SalesforceMappingObject::defaultLabel in Salesforce Suite 7.3
Retrieve the default label.
Overrides Entity::defaultLabel
File
- modules/
salesforce_mapping/ includes/ salesforce_mapping_object.entity.inc, line 64 - Contains SalesforceMappingObject.
Class
- SalesforceMappingObject
- Entity class for Salesforce Mapping Objects
Code
protected function defaultLabel() {
if (isset($this->is_new) && $this->is_new === TRUE) {
return '';
}
$label = NULL;
$wrapper = entity_metadata_wrapper('salesforce_mapping_object', $this);
$label = $wrapper->entity
->label();
$label = $label ? $label : $this->entity_type . ':' . $this->entity_id;
return t('"@label" to "@sf_id"', array(
'@label' => $label,
'@sf_id' => $this->salesforce_id,
));
}