public function ContextUploader::isReadyAcceptContext in TMGMT Translator Smartling 8
Same name and namespace in other branches
- 8.4 src/Context/ContextUploader.php \Drupal\tmgmt_smartling\Context\ContextUploader::isReadyAcceptContext()
- 8.2 src/Context/ContextUploader.php \Drupal\tmgmt_smartling\Context\ContextUploader::isReadyAcceptContext()
- 8.3 src/Context/ContextUploader.php \Drupal\tmgmt_smartling\Context\ContextUploader::isReadyAcceptContext()
Parameters
$filename:
Return value
bool
File
- src/
Context/ ContextUploader.php, line 196
Class
Namespace
Drupal\tmgmt_smartling\ContextCode
public function isReadyAcceptContext($filename, $proj_settings) {
$api = $this
->getApi($proj_settings, FALSE);
try {
$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;
}
return FALSE;
}