You are here

public function LingotekCommands::upload 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::upload()
  2. 4.0.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::upload()
  3. 3.0.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::upload()
  4. 3.1.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::upload()
  5. 3.3.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::upload()
  6. 3.4.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::upload()
  7. 3.5.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::upload()
  8. 3.6.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::upload()
  9. 3.7.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::upload()
  10. 3.8.x src/Cli/Commands/Drush9/LingotekCommands.php \Drupal\lingotek\Cli\Commands\Drush9\LingotekCommands::upload()

Upload content to Lingotek.

@option job_id Job ID to be included. @usage drush ltk-upload node 1 Upload node with ID 1. @usage drush ltk-upload taxonomy_term 3 --job="my_job_identifier" Upload taxonomy term with ID 3 assigning "my_job_identifier" as Job ID.

@command lingotek:upload @aliases ltk-upload,lingotek-upload

Parameters

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

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

array $options: An associative array of options whose values come from cli, aliases, config, etc.

File

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

Class

LingotekCommands
A Drush9 compatible commandfile with Lingotek operations.

Namespace

Drupal\lingotek\Cli\Commands\Drush9

Code

public function upload($entity_type_id, $entity_id, array $options = [
  'job_id' => NULL,
]) {
  $this->cliService
    ->setupOutput($this
    ->output());
  $this->cliService
    ->setLogger($this
    ->logger());
  $this->cliService
    ->upload($entity_type_id, $entity_id, $options['job_id']);
}