You are here

public function LingotekProfile::getWorkflowForTarget in Lingotek Translation 3.2.x

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

Gets the workflow to be used for a given language.

Parameters

string $langcode: The language code.

Return value

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

Overrides LingotekProfileInterface::getWorkflowForTarget

File

src/Entity/LingotekProfile.php, line 807

Class

LingotekProfile
Defines the LingotekProfile entity.

Namespace

Drupal\lingotek\Entity

Code

public function getWorkflowForTarget($langcode) {
  $workflow = $this
    ->getWorkflow();
  if (isset($this->language_overrides[$langcode]) && $this
    ->hasCustomSettingsForTarget($langcode)) {
    $workflow = $this->language_overrides[$langcode]['custom']['workflow'];
  }
  return $workflow;
}