You are here

protected function LingotekConfigManagementForm::generateOperations in Lingotek Translation 3.4.x

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

Generates an array of operations to be performed in a batch.

Parameters

string $operation: The operation (method of this object) to be executed.

array $values: The mappers this operation will be applied to.

$language: The language to be passed to that operation.

$job_id: The job ID to be passed to that operation.

Return value

array An array of operations suitable for a batch.

2 calls to LingotekConfigManagementForm::generateOperations()
LingotekConfigManagementForm::createBatch in src/Form/LingotekConfigManagementForm.php
Performs an operation to several values in a batch.
LingotekConfigManagementForm::createDebugExportBatch in src/Form/LingotekConfigManagementForm.php
Create and set an export batch.

File

src/Form/LingotekConfigManagementForm.php, line 1725

Class

LingotekConfigManagementForm
Form for bulk management of content.

Namespace

Drupal\lingotek\Form

Code

protected function generateOperations($operation, $values, $language, $job_id = NULL) {
  $operations = [];
  $mappers = $this
    ->getSelectedMappers($values);
  foreach ($mappers as $mapper) {
    $operations[] = [
      [
        $this,
        $operation,
      ],
      [
        $mapper,
        $language,
        $job_id,
      ],
    ];
  }
  return $operations;
}