You are here

public static function LingotekDocument::load in Lingotek Translation 7.3

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.4 lib/Drupal/lingotek/LingotekDocument.php \LingotekDocument::load()
  4. 7.5 lib/Drupal/lingotek/LingotekDocument.php \LingotekDocument::load()
  5. 7.6 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.

2 calls to LingotekDocument::load()
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 157
Defines LingotekDocument.

Class

LingotekDocument
A class representing a Lingotek Document

Code

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