You are here

public static function LingotekNode::loadByLingotekDocumentId in Lingotek Translation 7.3

Same name and namespace in other branches
  1. 7.2 lib/Drupal/lingotek/LingotekNode.php \LingotekNode::loadByLingotekDocumentId()
  2. 7.4 lib/Drupal/lingotek/LingotekNode.php \LingotekNode::loadByLingotekDocumentId()

Loads a LingotekNode by Lingotek Document ID.

Parameters

string $lingotek_document_id: The Document ID whose corresponding node should be loaded.

Return value

mixed A LingotekNode object on success, FALSE on failure.

File

lib/Drupal/lingotek/LingotekNode.php, line 120
Defines LingotekNode.

Class

LingotekNode
A class wrapper for Lingotek-specific behavior on nodes.

Code

public static function loadByLingotekDocumentId($lingotek_document_id) {
  $node = FALSE;
  $nid = LingotekSync::getNodeIdFromDocId($lingotek_document_id);
  if ($nid) {
    $node = self::loadById($nid);
  }
  return $node;
}