You are here

public static function LingotekSync::setAllUploadStatuses in Lingotek Translation 7.7

1 call to LingotekSync::setAllUploadStatuses()
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 160
LingotekSync

Class

LingotekSync
A utility class for Lingotek Syncing.

Code

public static function setAllUploadStatuses($entity_type, $entity_ids, $status) {
  foreach ($entity_ids as $entity_id) {
    $query = db_update('lingotek_entity_metadata')
      ->condition('entity_id', $entity_id)
      ->condition('entity_type', $entity_type)
      ->condition('entity_key', 'upload_status')
      ->fields(array(
      'value' => $status,
      'modified' => time(),
    ))
      ->execute();
  }
}