function lingotek_get_target_node_ids in Lingotek Translation 7.7
Returns an array of the nid's of target nodes for node based translation
Parameters
$nid The id of the source node:
Return value
$result An array of nid's for target nodes
2 calls to lingotek_get_target_node_ids()
- lingotek_delete_node_translations in ./
lingotek.util.inc - Delete translations for node based entities
- lingotek_node_delete in ./
lingotek.module - Implements hook_node_delete().
File
- ./
lingotek.util.inc, line 2808 - Utility functions.
Code
function lingotek_get_target_node_ids($nid) {
$result = db_select('node', 'n')
->fields('n', array(
'nid',
))
->condition('n.tnid', $nid, '=')
->execute()
->fetchCol();
$source_nid_key = array_search($nid, $result);
if ($source_nid_key !== FALSE) {
unset($result[$source_nid_key]);
}
return $result;
}