You are here

public static function LingotekConfigChunk::setSegmentStatusToCurrentById in Lingotek Translation 7.3

Same name and namespace in other branches
  1. 7.4 lib/Drupal/lingotek/LingotekConfigChunk.php \LingotekConfigChunk::setSegmentStatusToCurrentById()
  2. 7.5 lib/Drupal/lingotek/LingotekConfigChunk.php \LingotekConfigChunk::setSegmentStatusToCurrentById()

Set all segments for a given chunk ID to CURRENT status

Parameters

int: the ID of a chunk of configuration segments

2 calls to LingotekConfigChunk::setSegmentStatusToCurrentById()
LingotekApi::addContentDocument in lib/Drupal/lingotek/LingotekApi.php
Add a document to the Lingotek platform.
LingotekApi::updateContentDocument in lib/Drupal/lingotek/LingotekApi.php
Updates the content of an existing Lingotek document with the current object contents.

File

lib/Drupal/lingotek/LingotekConfigChunk.php, line 174
Defines LingotekConfigChunk.

Class

LingotekConfigChunk
A class wrapper for Lingotek-specific behavior on ConfigChunks.

Code

public static function setSegmentStatusToCurrentById($chunk_id) {
  $result = db_update('locales_target')
    ->fields(array(
    'i18n_status' => I18N_STRING_STATUS_CURRENT,
  ))
    ->condition('lid', self::minLid($chunk_id), '>=')
    ->condition('lid', self::maxLid($chunk_id), '<=')
    ->execute();
}