protected function LingotekEntityController::translationsPageRedirect in Lingotek Translation 3.2.x
Same name and namespace in other branches
- 8 src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::translationsPageRedirect()
- 8.2 src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::translationsPageRedirect()
- 4.0.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::translationsPageRedirect()
- 3.0.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::translationsPageRedirect()
- 3.1.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::translationsPageRedirect()
- 3.3.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::translationsPageRedirect()
- 3.4.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::translationsPageRedirect()
- 3.5.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::translationsPageRedirect()
- 3.6.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::translationsPageRedirect()
- 3.7.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::translationsPageRedirect()
- 3.8.x src/Controller/LingotekEntityController.php \Drupal\lingotek\Controller\LingotekEntityController::translationsPageRedirect()
6 calls to LingotekEntityController::translationsPageRedirect()
- LingotekEntityController::addTarget in src/
Controller/ LingotekEntityController.php - LingotekEntityController::checkTarget in src/
Controller/ LingotekEntityController.php - LingotekEntityController::checkUpload in src/
Controller/ LingotekEntityController.php - LingotekEntityController::download in src/
Controller/ LingotekEntityController.php - LingotekEntityController::update in src/
Controller/ LingotekEntityController.php
File
- src/
Controller/ LingotekEntityController.php, line 339
Class
Namespace
Drupal\lingotek\ControllerCode
protected function translationsPageRedirect(EntityInterface $entity) {
$entity_type_id = $entity
->getEntityTypeId();
$uri = Url::fromRoute("entity.{$entity_type_id}.content_translation_overview", [
$entity_type_id => $entity
->id(),
]);
$entity_type = $entity
->getEntityType();
if ($entity_type
->hasLinkTemplate('canonical')) {
return new RedirectResponse($uri
->setAbsolute(TRUE)
->toString());
}
else {
return new RedirectResponse($this->request
->getUri());
}
}