function globallink_get_xml in GlobalLink Connect for Drupal 7.6
Same name and namespace in other branches
- 7.7 globallink_node.inc \globallink_get_xml()
- 7.5 globallink_node.inc \globallink_get_xml()
Retrieves translation XML data.
Parameters
object $node: The node data.
string $target_arr: Array of locales node is being translated into.
int $tnid: The node id for existing translations. Defaults to null.
int $tvid: The node vid for existing translations. Defaults to null.
string $name: The xml document name. Defaults to empty string.
bool $for_display: Indicate for display purposes only. Defaults to false.
Return value
string The node deleted status or the translation XML data.
2 calls to globallink_get_xml()
- globallink_get_translations_for_row_id in ./
globallink_receive_translations.inc - Gets GlobalLink translations by row ID.
- globallink_send_for_translations in ./
globallink_node.inc - Sends content to GlobalLink for translation.
File
- ./
globallink_node.inc, line 1668
Code
function globallink_get_xml($node, $target_arr, $tnid = NULL, $tvid = NULL, &$name = '', $for_display = FALSE) {
if (is_null($node)) {
return 'Source Deleted';
}
elseif (!$node) {
return 'Source Deleted';
}
if ($node && is_object($node)) {
if ($node->language != 'en') {
$name = 'Node_' . $node->nid . '_Non_English' . $name;
}
else {
$name = globallink_format_file_name($node->title) . $name;
}
$xml = globallink_generate_xml_document($node, $target_arr, $tnid, $tvid, $for_display);
return $xml;
}
return 'Source Deleted';
}