You are here

public function LingotekConfigTranslationService::checkSourceStatus in Lingotek Translation 8

Same name and namespace in other branches
  1. 8.2 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::checkSourceStatus()
  2. 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::checkSourceStatus()
  3. 3.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::checkSourceStatus()
  4. 3.1.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::checkSourceStatus()
  5. 3.2.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::checkSourceStatus()
  6. 3.3.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::checkSourceStatus()
  7. 3.4.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::checkSourceStatus()
  8. 3.5.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::checkSourceStatus()
  9. 3.6.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::checkSourceStatus()
  10. 3.7.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::checkSourceStatus()
  11. 3.8.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::checkSourceStatus()

Checks the source is uploaded correctly.

Parameters

\Drupal\Core\Config\Entity\ConfigEntityInterface $entity: The entity which status we want to check.

Return value

boolean True if the entity is uploaded succesfully.

Overrides LingotekConfigTranslationServiceInterface::checkSourceStatus

File

src/LingotekConfigTranslationService.php, line 384
Contains \Drupal\lingotek\LingotekConfigTranslationService.

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

public function checkSourceStatus(ConfigEntityInterface &$entity) {
  $document_id = $this
    ->getDocumentId($entity);
  if ($document_id && $this->lingotek
    ->getDocumentStatus($document_id)) {
    $this
      ->setSourceStatus($entity, Lingotek::STATUS_CURRENT);
    return TRUE;
  }
  return FALSE;
}