public function LingotekConfigManagementForm::generateBulkOptions in Lingotek Translation 8.2
Same name and namespace in other branches
- 8 src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::generateBulkOptions()
- 4.0.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::generateBulkOptions()
- 3.0.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::generateBulkOptions()
- 3.1.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::generateBulkOptions()
- 3.2.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::generateBulkOptions()
- 3.3.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::generateBulkOptions()
- 3.4.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::generateBulkOptions()
- 3.5.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::generateBulkOptions()
- 3.6.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::generateBulkOptions()
- 3.7.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::generateBulkOptions()
- 3.8.x src/Form/LingotekConfigManagementForm.php \Drupal\lingotek\Form\LingotekConfigManagementForm::generateBulkOptions()
Get the bulk operations for the management form.
Return value
array Array with the bulk operations.
1 call to LingotekConfigManagementForm::generateBulkOptions()
- LingotekConfigManagementForm::buildForm in src/
Form/ LingotekConfigManagementForm.php - Form constructor.
File
- src/
Form/ LingotekConfigManagementForm.php, line 1591
Class
- LingotekConfigManagementForm
- Form for bulk management of content.
Namespace
Drupal\lingotek\FormCode
public function generateBulkOptions() {
$operations = [];
$operations['upload'] = $this
->t('Upload source for translation');
$operations['check_upload'] = $this
->t('Check upload progress');
$operations[(string) $this
->t('Request translations')]['request_translations'] = $this
->t('Request all translations');
$operations[(string) $this
->t('Check translation progress')]['check_translations'] = $this
->t('Check progress of all translations');
$operations[(string) $this
->t('Download')]['download'] = $this
->t('Download all translations');
$operations[(string) $this
->t('Cancel document')]['cancel'] = $this
->t('Cancel document');
foreach ($this->languageManager
->getLanguages() as $langcode => $language) {
$operations[(string) $this
->t('Cancel document')]['cancel:' . $langcode] = $this
->t('Cancel @language translation', [
'@language' => $language
->getName() . ' (' . $language
->getId() . ')',
]);
$operations[(string) $this
->t('Request translations')]['request_translation:' . $langcode] = $this
->t('Request @language translation', [
'@language' => $language
->getName() . ' (' . $language
->getId() . ')',
]);
$operations[(string) $this
->t('Check translation progress')]['check_translation:' . $langcode] = $this
->t('Check progress of @language translation', [
'@language' => $language
->getName() . ' (' . $language
->getId() . ')',
]);
$operations[(string) $this
->t('Download')]['download:' . $langcode] = $this
->t('Download @language translation', [
'@language' => $language
->getName() . ' (' . $language
->getId() . ')',
]);
}
foreach ($this->lingotekConfiguration
->getProfileOptions() as $profile_id => $profile) {
$operations[(string) $this
->t('Change Translation Profile')]['change_profile:' . $profile_id] = $this
->t('Change to @profile Profile', [
'@profile' => $profile,
]);
}
$operations['Jobs management'] = [
'assign_job' => $this
->t('Assign Job ID'),
'clear_job' => $this
->t('Clear Job ID'),
];
$debug_enabled = \Drupal::state()
->get('lingotek.enable_debug_utilities', FALSE);
if ($debug_enabled) {
$operations['debug']['debug.export'] = $this
->t('Debug: Export sources as JSON');
}
return $operations;
}