You are here

public static function LingotekConfigSet::loadById in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekConfigSet.php \LingotekConfigSet::loadById()

Factory method for getting a loaded LingotekConfigSet object.

Parameters

int $set_id: A Drupal config set ID.

Return value

mixed A loaded LingotekConfigSet object if found, FALSE if the set could not be loaded.

5 calls to LingotekConfigSet::loadById()
LingotekConfigSet::loadByLingotekDocumentId in lib/Drupal/lingotek/LingotekConfigSet.php
Loads a LingotekConfigSet by Lingotek Document ID.
LingotekSync::getConfigSet in lib/Drupal/lingotek/LingotekSync.php
LingotekSync::insertTargetEntriesForAllSets in lib/Drupal/lingotek/LingotekSync.php
lingotek_sync_download_config_target in ./lingotek.batch.inc
lingotek_sync_upload_config_set in ./lingotek.batch.inc
Upload Batch Worker Function: Upload Config Set for Translation

File

lib/Drupal/lingotek/LingotekConfigSet.php, line 398
Defines LingotekConfigSet.

Class

LingotekConfigSet
A class wrapper for Lingotek-specific behavior on ConfigSets.

Code

public static function loadById($set_id) {
  $set = FALSE;

  // get any segments that should be associated with this set
  // if segments exist, return a LingotekConfigSet instance
  // otherwise, return FALSE
  $set_segments = self::getLidsFromSets($set_id);
  if ($set_segments) {
    $set = new LingotekConfigSet($set_id);
    $set
      ->setApi(LingotekApi::instance());
  }
  return $set;
}