public static function LingotekSync::getETNodeIds in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.7 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getETNodeIds()
- 7.4 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getETNodeIds()
- 7.5 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getETNodeIds()
- 7.6 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getETNodeIds()
1 call to LingotekSync::getETNodeIds()
- LingotekSync::getUploadableReport in lib/
Drupal/ lingotek/ LingotekSync.php
File
- lib/
Drupal/ lingotek/ LingotekSync.php, line 294 - LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function getETNodeIds() {
// get nids for entity_translation nodes that are not lingotek pushed
$types = lingotek_translatable_node_types();
// get all translatable node types
$et_content_types = array();
foreach ($types as $type) {
if (lingotek_managed_by_entity_translation($type)) {
// test if lingotek_managed_by_entity_translation
$et_content_types[] = $type;
}
}
if (empty($et_content_types)) {
return array();
}
$nodes = entity_load('node', FALSE, array(
'type' => $et_content_types,
));
// select nodes with et types
$et_node_ids = array();
foreach ($nodes as $node) {
if (!lingotek_node_pushed($node)) {
$et_node_ids[] = $node->nid;
}
}
return $et_node_ids;
}