You are here

function LingotekApi::handleCommunityError in Lingotek Translation 7.7

2 calls to LingotekApi::handleCommunityError()
LingotekApi::addContentDocument in lib/Drupal/lingotek/LingotekApi.php
Add a document to the Lingotek platform.
LingotekApi::updateContentDocument in lib/Drupal/lingotek/LingotekApi.php
Updates the content of an existing Lingotek document with the current object contents.

File

lib/Drupal/lingotek/LingotekApi.php, line 280
Defines Drupal\lingotek\LingotekApi

Class

LingotekApi
@file Defines Drupal\lingotek\LingotekApi

Code

function handleCommunityError(LingotekTranslatableEntity $translatable_object) {
  $translatable_object
    ->deleteMetadataValue('document_id');
  $translatable_object
    ->setStatus(LingotekSync::STATUS_ERROR);
  $translatable_object
    ->setExclusiveTargetsStatus(LingotekSync::STATUS_NONE, [
    LingotekSync::STATUS_CURRENT,
    LingotekSync::STATUS_READY,
  ]);
  $this
    ->communityDisabledErrorMessage();
  return FALSE;
}