protected function LingotekConfigTranslationController::redirectToEntityTranslateOverview in Lingotek Translation 3.1.x
Same name and namespace in other branches
- 8 src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController::redirectToEntityTranslateOverview()
- 8.2 src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController::redirectToEntityTranslateOverview()
- 4.0.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController::redirectToEntityTranslateOverview()
- 3.0.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController::redirectToEntityTranslateOverview()
- 3.2.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController::redirectToEntityTranslateOverview()
- 3.3.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController::redirectToEntityTranslateOverview()
- 3.4.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController::redirectToEntityTranslateOverview()
- 3.5.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController::redirectToEntityTranslateOverview()
- 3.6.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController::redirectToEntityTranslateOverview()
- 3.7.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController::redirectToEntityTranslateOverview()
- 3.8.x src/Controller/LingotekConfigTranslationController.php \Drupal\lingotek\Controller\LingotekConfigTranslationController::redirectToEntityTranslateOverview()
Redirect to config entity translation overview page.
Parameters
string $entity_type: The config entity type id.
string $entity_id: The config entity id.
Return value
\Symfony\Component\HttpFoundation\RedirectResponse A redirect response.
6 calls to LingotekConfigTranslationController::redirectToEntityTranslateOverview()
- LingotekConfigTranslationController::checkDownload in src/
Controller/ LingotekConfigTranslationController.php - LingotekConfigTranslationController::checkUpload in src/
Controller/ LingotekConfigTranslationController.php - LingotekConfigTranslationController::download in src/
Controller/ LingotekConfigTranslationController.php - LingotekConfigTranslationController::request in src/
Controller/ LingotekConfigTranslationController.php - LingotekConfigTranslationController::update in src/
Controller/ LingotekConfigTranslationController.php
File
- src/
Controller/ LingotekConfigTranslationController.php, line 565
Class
Namespace
Drupal\lingotek\ControllerCode
protected function redirectToEntityTranslateOverview($entity_type, $entity_id) {
$mappers = $this->configMapperManager
->getMappers();
if ($entity_type === 'field_config') {
$field_config = FieldConfig::load($entity_id);
$id = $field_config
->getTargetEntityTypeId();
$mapper = $mappers[$id . '_fields'];
$mapper
->setEntity($field_config);
$entity_definition = $this->entityTypeManager
->getDefinition($id);
$uri = Url::fromRoute($mapper
->getOverviewRouteName(), [
$entity_type => $entity_id,
$entity_definition
->getBundleEntityType() => $field_config
->getTargetBundle(),
]);
}
else {
$mapper = $mappers[$entity_type];
$uri = Url::fromRoute($mapper
->getOverviewRouteName(), [
$entity_type => $entity_id,
]);
}
return new RedirectResponse($uri
->setAbsolute(TRUE)
->toString());
}