public static function LingotekSync::bulkSetAllTargetStatus in Lingotek Translation 7.7
2 calls to LingotekSync::bulkSetAllTargetStatus()
- lingotek_entity_change_workflow in ./
lingotek.module - Changes an entity's workflow locally and on the TMS
- lingotek_entity_disassociate_form_submit in ./
lingotek.bulk_grid.inc - Submit handler for the lingotek_entity_disassociate form.
File
- lib/
Drupal/ lingotek/ LingotekSync.php, line 136 - LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function bulkSetAllTargetStatus($entity_type, $entity_ids, $status) {
if ($entity_type === 'config') {
$query = db_update('lingotek_config_metadata')
->condition('id', $entity_ids, "IN")
->condition('config_key', 'target_sync_status%', 'LIKE')
->fields(array(
'value' => $status,
'modified' => time(),
))
->execute();
return;
}
$query = db_update('lingotek_entity_metadata')
->condition('entity_type', $entity_type)
->condition('entity_id', $entity_ids, "IN")
->condition('entity_key', 'target_sync_status%', 'LIKE')
->fields(array(
'value' => $status,
'modified' => time(),
))
->execute();
foreach ($entity_ids as $eid) {
lingotek_cache_clear($entity_type, $eid);
}
}