You are here

public static function LingotekNode::loadById in Lingotek Translation 7.4

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

Factory method for getting a loaded LingotekNode object.

Parameters

int $node_id: A Drupal node ID.

Return value

mixed A loaded LingotekNode object on success, FALSE on failure.

2 calls to LingotekNode::loadById()
LingotekComment::updateLocalContentByTarget in lib/Drupal/lingotek/LingotekComment.php
Updates the local content of $target_code with data from a Lingotek Document
LingotekNode::loadByLingotekDocumentId in lib/Drupal/lingotek/LingotekNode.php
Loads a LingotekNode by Lingotek Document ID.

File

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

Class

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

Code

public static function loadById($node_id) {
  $node = FALSE;
  if ($drupal_node = lingotek_node_load_default($node_id)) {
    $node = self::load($drupal_node);
  }
  return $node;
}