public function LingotekWorkbenchRedirectController::redirectToWorkbench in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 8.2 src/Controller/LingotekWorkbenchRedirectController.php \Drupal\lingotek\Controller\LingotekWorkbenchRedirectController::redirectToWorkbench()
- 4.0.x src/Controller/LingotekWorkbenchRedirectController.php \Drupal\lingotek\Controller\LingotekWorkbenchRedirectController::redirectToWorkbench()
- 3.0.x src/Controller/LingotekWorkbenchRedirectController.php \Drupal\lingotek\Controller\LingotekWorkbenchRedirectController::redirectToWorkbench()
- 3.1.x src/Controller/LingotekWorkbenchRedirectController.php \Drupal\lingotek\Controller\LingotekWorkbenchRedirectController::redirectToWorkbench()
- 3.2.x src/Controller/LingotekWorkbenchRedirectController.php \Drupal\lingotek\Controller\LingotekWorkbenchRedirectController::redirectToWorkbench()
- 3.3.x src/Controller/LingotekWorkbenchRedirectController.php \Drupal\lingotek\Controller\LingotekWorkbenchRedirectController::redirectToWorkbench()
- 3.5.x src/Controller/LingotekWorkbenchRedirectController.php \Drupal\lingotek\Controller\LingotekWorkbenchRedirectController::redirectToWorkbench()
- 3.6.x src/Controller/LingotekWorkbenchRedirectController.php \Drupal\lingotek\Controller\LingotekWorkbenchRedirectController::redirectToWorkbench()
- 3.7.x src/Controller/LingotekWorkbenchRedirectController.php \Drupal\lingotek\Controller\LingotekWorkbenchRedirectController::redirectToWorkbench()
- 3.8.x src/Controller/LingotekWorkbenchRedirectController.php \Drupal\lingotek\Controller\LingotekWorkbenchRedirectController::redirectToWorkbench()
Redirects to the workbench of the given document and locale in the TMS.
1 string reference to 'LingotekWorkbenchRedirectController::redirectToWorkbench'
File
- src/
Controller/ LingotekWorkbenchRedirectController.php, line 71
Class
- LingotekWorkbenchRedirectController
- Controller for redirecting to the Lingotek TMS workbench.
Namespace
Drupal\lingotek\ControllerCode
public function redirectToWorkbench($doc_id, $locale) {
// Get account settings to build workbench link.
$account = $this
->config('lingotek.settings')
->get('account');
// Generate the uri to the Lingotek Workbench.
$uri = $this
->generateWorkbenchUri($doc_id, $locale, $account);
return new TrustedRedirectResponse(Url::fromUri($uri)
->toString());
}