You are here

protected function LingotekBatchController::getDownloadOperations in Lingotek Translation 3.0.x

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

File

src/Controller/LingotekBatchController.php, line 86

Class

LingotekBatchController

Namespace

Drupal\lingotek\Controller

Code

protected function getDownloadOperations($entity_type, $entity_ids, $locales) {
  $operations = [];
  if (is_array($entity_ids)) {
    foreach ($entity_ids as $id) {
      foreach ($locales as $locale) {
        $operations[] = [
          'lingotek_operation_translation_download',
          [
            $entity_type,
            $id,
            $locale,
          ],
        ];
      }
    }
  }
  return $operations;
}