public function PushCallbackController::callback in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8 src/Controller/PushCallbackController.php \Drupal\tmgmt_smartling\Controller\PushCallbackController::callback()
- 8.2 src/Controller/PushCallbackController.php \Drupal\tmgmt_smartling\Controller\PushCallbackController::callback()
- 8.3 src/Controller/PushCallbackController.php \Drupal\tmgmt_smartling\Controller\PushCallbackController::callback()
1 string reference to 'PushCallbackController::callback'
File
- src/
Controller/ PushCallbackController.php, line 13
Class
Namespace
Drupal\tmgmt_smartling\ControllerCode
public function callback(Request $request) {
// Check if we have a job.
if (!$request
->get('job')) {
throw new NotFoundHttpException();
}
// Check if we have a job.
if (!$request
->get('fileUri') || !$request
->get('locale')) {
throw new NotFoundHttpException();
}
$job = Job::load($request
->get('job'));
if (!$job) {
throw new NotFoundHttpException();
}
tmgmt_smartling_download_file($job);
return new Response('OK');
}