You are here

protected function LingotekSettingsTabProfilesEditForm::saveNewProfile in Lingotek Translation 3.4.x

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

File

src/Form/LingotekSettingsTabProfilesEditForm.php, line 211

Class

LingotekSettingsTabProfilesEditForm
Configure Lingotek

Namespace

Drupal\lingotek\Form

Code

protected function saveNewProfile($name, $auto_upload, $auto_download, $auto_download_worker) {
  $profile = LingotekProfile::create([
    'id' => \Drupal::transliteration()
      ->transliterate($name),
    'label' => $name,
    'auto_upload' => $auto_upload,
    'auto_download' => $auto_download,
    'auto_download_worker' => $auto_download_worker,
  ]);
}