You are here

function lingotek_entity_download_triggered in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.5 lingotek.module \lingotek_entity_download_triggered()
  2. 7.6 lingotek.module \lingotek_entity_download_triggered()
1 call to lingotek_entity_download_triggered()
LingotekEntity::downloadTriggered in lib/Drupal/lingotek/LingotekEntity.php
Updates the local content of $target_code with data from a Lingotek Document

File

./lingotek.module, line 1848

Code

function lingotek_entity_download_triggered($entity, $entity_type, $lingotek_locale, &$context = FALSE) {
  if (is_numeric($entity)) {
    $entity = lingotek_entity_load_single($entity_type, $entity);
  }
  $profile = LingotekProfile::loadByEntity($entity_type, $entity);
  if ($profile
    ->isAutoDownload($lingotek_locale)) {
    return lingotek_entity_download($entity, $entity_type, $lingotek_locale, $context);
  }
  return FALSE;
}