function lingotek_advanced_parsing_update_node in Lingotek Translation 7.2
Same name and namespace in other branches
- 7.7 lingotek.module \lingotek_advanced_parsing_update_node()
- 7.3 lingotek.module \lingotek_advanced_parsing_update_node()
- 7.4 lingotek.module \lingotek_advanced_parsing_update_node()
- 7.5 lingotek.module \lingotek_advanced_parsing_update_node()
- 7.6 lingotek.module \lingotek_advanced_parsing_update_node()
Processing callback for the advanced parsing update batch operation.
1 string reference to 'lingotek_advanced_parsing_update_node'
- lingotek_handle_advanced_xml_upgrade in ./
lingotek.admin.inc - Custom form handler for upgrading a site from using Lingotek's simple to advanced XML parsing of content.
File
- ./
lingotek.module, line 998
Code
function lingotek_advanced_parsing_update_node($nid, &$context) {
$process_node = node_load($nid);
if (!empty($process_node->nid)) {
$context['message'] = t('Sending advanced parsing data to Lingotek for node @node_id: @node_title', array(
'@node_id' => $process_node->nid,
'@node_title' => $process_node->title,
));
if (LingotekApi::instance()
->updateContentDocument(LingotekNode::load($process_node))) {
$context['results'][] = t('Updated node: @id', array(
'@id' => $process_node->nid,
));
}
else {
watchdog('lingotek', 'Unable to send advanced XML version of node to Lingotek: @node_id', array(
'@node_id' => $process_node->nid,
), WATCHDOG_ERROR);
}
}
}