You are here

public static function LingotekSync::getEntityTranslationPublishedSetting in Lingotek Translation 7.7

Gets the source published setting for entity translation entries

1 call to LingotekSync::getEntityTranslationPublishedSetting()
lingotek_process_entity_xml in ./lingotek.remote.inc

File

lib/Drupal/lingotek/LingotekSync.php, line 1420
LingotekSync

Class

LingotekSync
A utility class for Lingotek Syncing.

Code

public static function getEntityTranslationPublishedSetting($entity_id) {
  if (!db_table_exists('entity_translation')) {
    return '1';
  }
  $source_setting = db_select('entity_translation', 'et')
    ->fields('et', array(
    'status',
  ))
    ->condition('entity_id', $entity_id)
    ->condition('source', '')
    ->execute()
    ->fetchField();
  if (is_null($source_setting)) {
    return '1';
  }
  return $source_setting;
}