public function ContextUploader::isReadyAcceptContext in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 src/Context/ContextUploader.php \Drupal\tmgmt_smartling\Context\ContextUploader::isReadyAcceptContext()
- 8 src/Context/ContextUploader.php \Drupal\tmgmt_smartling\Context\ContextUploader::isReadyAcceptContext()
- 8.2 src/Context/ContextUploader.php \Drupal\tmgmt_smartling\Context\ContextUploader::isReadyAcceptContext()
Parameters
$filename:
Return value
bool
File
- src/
Context/ ContextUploader.php, line 342
Class
Namespace
Drupal\tmgmt_smartling\ContextCode
public function isReadyAcceptContext($filename, $proj_settings) {
try {
$api = $this
->getApiWrapper($proj_settings)
->getApi('file');
$res = $api
->getStatusAllLocales($filename);
if (!$res) {
$this->logger
->warning('File "@filename" is not ready to accept context. Most likely it is being processed by Smartling right now.', [
'@filename' => $filename,
]);
}
return $res;
} catch (Exception $e) {
$this->logger
->warning($e
->getMessage());
return FALSE;
}
}