private function LingotekConfigChunk::__construct in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.4 lib/Drupal/lingotek/LingotekConfigChunk.php \LingotekConfigChunk::__construct()
- 7.5 lib/Drupal/lingotek/LingotekConfigChunk.php \LingotekConfigChunk::__construct()
Constructor.
This is private since we want consumers to instantiate via the factory methods.
Parameters
$chunk_id: A Config Chunk ID.
File
- lib/
Drupal/ lingotek/ LingotekConfigChunk.php, line 52 - Defines LingotekConfigChunk.
Class
- LingotekConfigChunk
- A class wrapper for Lingotek-specific behavior on ConfigChunks.
Code
private function __construct($chunk_id = NULL) {
$this->cid = $chunk_id;
$this->chunk_size = LINGOTEK_CONFIG_CHUNK_SIZE;
$this->source_data = self::getAllSegments($this->cid);
$this->source_meta = self::getChunkMeta($this->cid);
$this->language = language_default();
if (!isset($this->language->lingotek_locale)) {
// if Drupal variable 'language_default' does not exist
$this->language->lingotek_locale = Lingotek::convertDrupal2Lingotek($this->language->language);
}
$this->language_targets = Lingotek::availableLanguageTargetsWithoutSource($this->language->lingotek_locale);
$this->min_lid = $this
->getMinLid();
$this->max_lid = $this
->getMaxLid();
}