protected function LingotekConfigManagementForm::getTargetActionUrl in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getTargetActionUrl()
- 4.0.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getTargetActionUrl()
- 3.0.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getTargetActionUrl()
- 3.1.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getTargetActionUrl()
- 3.2.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getTargetActionUrl()
- 3.3.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getTargetActionUrl()
- 3.4.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getTargetActionUrl()
- 3.5.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getTargetActionUrl()
- 3.6.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getTargetActionUrl()
- 3.7.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getTargetActionUrl()
- 3.8.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::getTargetActionUrl()
1 call to LingotekConfigManagementForm::getTargetActionUrl()
- LingotekConfigManagementForm::getTranslationsStatuses in src/
Form/ LingotekConfigManagementForm.php - Gets the translation status of an entity in a format ready to display.
File
- src/
Form/ LingotekConfigManagementForm.php, line 1272 - Contains \Drupal\Lingotek\Form\LingotekConfigManagementForm.
Class
- LingotekConfigManagementForm
- Form for bulk management of content.
Namespace
Drupal\lingotek\FormCode
protected function getTargetActionUrl(ConfigMapperInterface &$mapper, $target_status, $langcode) {
$url = NULL;
$args = $this
->getActionUrlArguments($mapper);
$document_id = $mapper instanceof ConfigEntityMapper ? $this->translationService
->getDocumentId($mapper
->getEntity()) : $this->translationService
->getConfigDocumentId($mapper);
$locale = $this->languageLocaleMapper
->getLocaleForLangcode($langcode);
if ($locale) {
if ($target_status == Lingotek::STATUS_REQUEST || $target_status == Lingotek::STATUS_UNTRACKED) {
$url = Url::fromRoute('lingotek.config.request', $args + [
'locale' => $locale,
], [
'query' => $this
->getDestinationArray(),
]);
}
if ($target_status == Lingotek::STATUS_PENDING) {
$url = Url::fromRoute('lingotek.config.check_download', $args + [
'locale' => $locale,
], [
'query' => $this
->getDestinationArray(),
]);
}
if ($target_status == Lingotek::STATUS_READY) {
$url = Url::fromRoute('lingotek.config.download', $args + [
'locale' => $locale,
], [
'query' => $this
->getDestinationArray(),
]);
}
if ($target_status == Lingotek::STATUS_CURRENT || $target_status == Lingotek::STATUS_INTERMEDIATE || $target_status == Lingotek::STATUS_EDITED) {
$url = Url::fromRoute('lingotek.workbench', [
'doc_id' => $document_id,
'locale' => $locale,
]);
}
}
return $url;
}