You are here

public static function LingotekConfigChunk::getIdBySegment in Lingotek Translation 7.4

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

Return the chunk ID for a given segment from the locales source

Parameters

int: the lid of a segment from the locales source

Return value

int the ID of a chunk of configuration segments

1 call to LingotekConfigChunk::getIdBySegment()
LingotekSync::getDirtyConfigChunks in lib/Drupal/lingotek/LingotekSync.php

File

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

Class

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

Code

public static function getIdBySegment($lid) {
  return intval($lid / LINGOTEK_CONFIG_CHUNK_SIZE) + 1;
}