You are here

function lingotek_update_marked_items in Lingotek Translation 7.7

Updates marked value in the lingotek_entity_metadata table

1 string reference to 'lingotek_update_marked_items'
lingotek_get_marked_batch_elements in ./lingotek.batch.inc
Update marked entities: Creates the batch elements for marked entities.

File

./lingotek.bulk_grid.inc, line 894

Code

function lingotek_update_marked_items($entity_type, $entity_id, &$context) {
  if (empty($context['results'])) {
    $context['results']['marked'] = 1;
    if ($entity_type === 'config') {
      $context['results']['entity_type'] = 'config';
    }
  }
  else {
    $context['results']['marked'] += 1;
  }
  if ($entity_type === 'config') {
    $marked_offset = $entity_id + LingotekSync::MARKED_OFFSET;
    LingotekSync::setConfigMarkedValue($entity_id, $marked_offset, LingotekSync::MARKED);
  }
  else {
    lingotek_keystore($entity_type, $entity_id, 'marked', LingotekSync::MARKED);
  }
}