You are here

function globallink_entity_reference_get_xml in GlobalLink Connect for Drupal 7.7

1 call to globallink_entity_reference_get_xml()
globallink_send_entity_ref_for_translations in ./globallink_background_jobs.inc

File

globallink_custom_entity/globallink_custom_entity.inc, line 3

Code

function globallink_entity_reference_get_xml($entity, $target_arr, $tnid = NULL, $tvid = NULL, &$name = '', $for_display = FALSE, $source_lang = '', $entity_type) {
  if (is_null($entity) || !$entity) {
    return GLOBALLINK_STATUS_TRANSLATION_SOURCE_DELETED;
  }
  if ($entity && is_object($entity)) {
    $name = globallink_format_file_name('CustomEntity') . '_' . $entity->type . '_' . $entity->id . $name;
    $xml = globallink_entity_reference_generate_xml_document($entity, $target_arr, $tnid, $for_display, $source_lang, $entity_type);
    return $xml;
  }
  return GLOBALLINK_STATUS_TRANSLATION_SOURCE_DELETED;
}