You are here

public function LingotekCommands::checkTranslationsStatuses in Lingotek Translation 3.2.x

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

Request translations to Lingotek.

@usage drush ltk-check-status node 1 Check translation statuses for node with ID 1. @usage drush ltk-check-status taxonomy_term 3 --langcodes=es,it Check Spanish and Italian translation statuses for taxonomy term with ID 3.

@field-labels langcode: Language code status: Status @default-fields langcode,status

@command lingotek:check-translations-statuses @aliases ltk-check-status,lingotek-check-translations-statuses

Parameters

$entity_type_id: The entity type ID. E.g. "node"

$entity_id: The entity ID. E.g. "2"

Return value

\Consolidation\OutputFormatters\StructuredData\RowsOfFields Statuses of the given translations formatted as a table.

File

src/Cli/Commands/Drush9/LingotekCommands.php, line 136

Class

LingotekCommands
A Drush9 compatible commandfile with Lingotek operations.

Namespace

Drupal\lingotek\Cli\Commands\Drush9

Code

public function checkTranslationsStatuses($entity_type_id, $entity_id, $options = [
  'langcodes' => 'all',
]) {
  $this->cliService
    ->setupOutput($this
    ->output());
  $this->cliService
    ->setLogger($this
    ->logger());
  $langcodes = StringUtils::csvToArray($options['langcodes']);
  $languages = $this->cliService
    ->checkTranslationsStatuses($entity_type_id, $entity_id, $langcodes);
  return new RowsOfFields($languages);
}