public function LingotekInterfaceTranslationService::checkSourceStatus in Lingotek Translation 3.5.x
Same name and namespace in other branches
- 4.0.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::checkSourceStatus()
- 3.2.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::checkSourceStatus()
- 3.3.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::checkSourceStatus()
- 3.4.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::checkSourceStatus()
- 3.6.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::checkSourceStatus()
- 3.7.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::checkSourceStatus()
- 3.8.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::checkSourceStatus()
Checks the source is uploaded correctly.
Parameters
string $component: The component which status we want to check.
Return value
bool True if the component is uploaded successfully.
Overrides LingotekInterfaceTranslationServiceInterface::checkSourceStatus
File
- src/
LingotekInterfaceTranslationService.php, line 137
Class
- LingotekInterfaceTranslationService
- Service for managing Lingotek interface translations.
Namespace
Drupal\lingotekCode
public function checkSourceStatus($component) {
$document_id = $this
->getDocumentId($component);
if ($document_id) {
// Document has successfully imported.
if ($this->lingotek
->getDocumentStatus($document_id)) {
$this
->setSourceStatus($component, Lingotek::STATUS_CURRENT);
return TRUE;
}
else {
return FALSE;
}
}
return FALSE;
}