You are here

public function LingotekProfile::hasAutomaticDownloadForTarget in Lingotek Translation 3.5.x

Same name and namespace in other branches
  1. 8 src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::hasAutomaticDownloadForTarget()
  2. 8.2 src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::hasAutomaticDownloadForTarget()
  3. 4.0.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::hasAutomaticDownloadForTarget()
  4. 3.0.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::hasAutomaticDownloadForTarget()
  5. 3.1.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::hasAutomaticDownloadForTarget()
  6. 3.2.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::hasAutomaticDownloadForTarget()
  7. 3.3.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::hasAutomaticDownloadForTarget()
  8. 3.4.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::hasAutomaticDownloadForTarget()
  9. 3.6.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::hasAutomaticDownloadForTarget()
  10. 3.7.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::hasAutomaticDownloadForTarget()
  11. 3.8.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::hasAutomaticDownloadForTarget()

Returns whether this profile indicates automatic download of translations for an specific target language.

Parameters

string $langcode: The language code.

Return value

bool Whether the profile indicates automatic download or not.

Overrides LingotekProfileInterface::hasAutomaticDownloadForTarget

File

src/Entity/LingotekProfile.php, line 866

Class

LingotekProfile
Defines the LingotekProfile entity.

Namespace

Drupal\lingotek\Entity

Code

public function hasAutomaticDownloadForTarget($langcode) {
  $auto_download = $this
    ->hasAutomaticDownload();
  if (isset($this->language_overrides[$langcode]) && $this
    ->hasCustomSettingsForTarget($langcode)) {
    $auto_download = $this->language_overrides[$langcode]['custom']['auto_download'];
  }
  if ($this
    ->hasDisabledTarget($langcode)) {
    $auto_download = FALSE;
  }
  return $auto_download;
}