You are here

public static function LingotekDocument::load in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekDocument.php \LingotekDocument::load()
  2. 7.2 lib/Drupal/lingotek/LingotekDocument.php \LingotekDocument::load()
  3. 7.3 lib/Drupal/lingotek/LingotekDocument.php \LingotekDocument::load()
  4. 7.4 lib/Drupal/lingotek/LingotekDocument.php \LingotekDocument::load()
  5. 7.5 lib/Drupal/lingotek/LingotekDocument.php \LingotekDocument::load()

Factory method for getting a loaded LingotekDocument object.

Parameters

int $document_id: A Lingotek Document ID.

Return value

LingotekDocument A loaded LingotekDocument object.

3 calls to LingotekDocument::load()
lingotek_download_translations_form in ./lingotek.page.inc
Download Translations Form.
lingotek_mark_phases_complete in ./lingotek.page.inc
Form constructor for the lingotek_mark_phases_complete form.
lingotek_pm in ./lingotek.page.inc
Page callback for the Lingotek local task on node detail pages.

File

lib/Drupal/lingotek/LingotekDocument.php, line 186
Defines LingotekDocument.

Class

LingotekDocument
A class representing a Lingotek Document

Code

public static function load($document_id) {
  $document_id = $document_id;
  if (empty($documents[$document_id])) {
    $document = new LingotekDocument($document_id);
    $document
      ->setApi(LingotekApi::instance());
    $documents[$document_id] = $document;
  }
  return $documents[$document_id];
}