You are here

public function LingotekProfile::getVaultForTarget in Lingotek Translation 3.4.x

Same name and namespace in other branches
  1. 4.0.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::getVaultForTarget()
  2. 3.1.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::getVaultForTarget()
  3. 3.2.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::getVaultForTarget()
  4. 3.3.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::getVaultForTarget()
  5. 3.5.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::getVaultForTarget()
  6. 3.6.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::getVaultForTarget()
  7. 3.7.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::getVaultForTarget()
  8. 3.8.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::getVaultForTarget()

Gets the vault to be used for a given language.

Parameters

string $langcode: The language code.

Return value

string The vault identifier, used to request translations. If 'default, the default site vault should be used.

Overrides LingotekProfileInterface::getVaultForTarget

File

src/Entity/LingotekProfile.php, line 903

Class

LingotekProfile
Defines the LingotekProfile entity.

Namespace

Drupal\lingotek\Entity

Code

public function getVaultForTarget($langcode) {
  $vault = $this
    ->getVault();
  if (isset($this->language_overrides[$langcode]) && $this
    ->hasCustomSettingsForTarget($langcode)) {
    $vault = $this->language_overrides[$langcode]['custom']['vault'];
  }
  return $vault;
}