You are here

private function LingotekNode::loadLingonode in Lingotek Translation 7.4

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

Method for loading the values for the lingonode

Parameters

none:

Return value

boolean

File

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

Class

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

Code

private function loadLingonode() {
  if ($this->nid) {

    // add in all values from the lingonode table (when missing set use global defaults)
    $lingonode = (object) lingotek_lingonode($this->nid);
    if ($lingonode) {
      $lingonode->auto_download = $lingonode->sync_method === FALSE ? variable_get('lingotek_sync') : $lingonode->sync_method;
      $this->lingonode = $lingonode;
      return TRUE;
    }
  }
  return FALSE;
}