public function ProgressTrackerController::callback in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.3 src/Controller/ProgressTrackerController.php \Drupal\tmgmt_smartling\Controller\ProgressTrackerController::callback()
1 string reference to 'ProgressTrackerController::callback'
File
- src/
Controller/ ProgressTrackerController.php, line 12
Class
Namespace
Drupal\tmgmt_smartling\ControllerCode
public function callback(Request $request) {
try {
$smartling_provider_config = \Drupal::getContainer()
->get("tmgmt_smartling.smartling_config_manager")
->getConfigByProjectId($request
->get("projectId"));
$api_wrapper = \Drupal::getContainer()
->get("tmgmt_smartling.smartling_api_wrapper");
$api_wrapper
->setSettings($smartling_provider_config
->get("settings"));
$api_wrapper
->getApi("progress")
->deleteRecord($request
->get("spaceId"), $request
->get("objectId"), $request
->get("recordId"));
} catch (Exception $e) {
return new Response('Failed', 500);
}
return new Response('OK');
}