public static function LingotekSync::getUploadableReport in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.7 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getUploadableReport()
- 7.4 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getUploadableReport()
- 7.5 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getUploadableReport()
- 7.6 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getUploadableReport()
1 call to LingotekSync::getUploadableReport()
- LingotekSync::getReport in lib/
Drupal/ lingotek/ LingotekSync.php
File
- lib/
Drupal/ lingotek/ LingotekSync.php, line 426 - LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function getUploadableReport() {
// Handle nodes
$edited_nodes = self::getNodeIdsByStatus(self::STATUS_EDITED);
$report = array(
'upload_nids' => $edited_nodes,
'upload_nids_count' => count($edited_nodes),
);
if (module_exists('entity_translation')) {
$et_nodes = self::getETNodeIds();
$report = array_merge($report, array(
'upload_nids_et' => $et_nodes,
'upload_nids_et_count' => count($et_nodes),
));
}
if (module_exists('workbench_moderation')) {
$no_wb_nodes = empty($edited_nodes) ? array() : self::getNonWorkbenchModerationNodeIds($edited_nodes);
$report = array_merge($report, array(
'upload_nids_nowb' => $no_wb_nodes,
'upload_nids_nowb_count' => count($no_wb_nodes),
));
}
// Handle configuration chunks
if (variable_get('lingotek_translate_config')) {
$config_chunks_to_update = self::getDirtyConfigChunks();
$num_updates = count($config_chunks_to_update);
$report = array_merge($report, array(
'upload_config' => array_keys($config_chunks_to_update),
'upload_config_count' => $num_updates,
));
}
return $report;
}