You are here

public function LingotekWorkbenchModerationSettingsForm::submitHandler in Lingotek Translation 3.8.x

Same name and namespace in other branches
  1. 8.2 src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::submitHandler()
  2. 4.0.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::submitHandler()
  3. 3.1.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::submitHandler()
  4. 3.2.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::submitHandler()
  5. 3.3.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::submitHandler()
  6. 3.4.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::submitHandler()
  7. 3.5.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::submitHandler()
  8. 3.6.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::submitHandler()
  9. 3.7.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::submitHandler()

Submit handler for saving the settings for a given bundle.

Parameters

string $entity_type_id: The entity type id.

string $bundle: The bundle id.

array $form_values: The submitted form values.

Overrides LingotekModerationSettingsFormInterface::submitHandler

File

src/Moderation/LingotekWorkbenchModerationSettingsForm.php, line 200

Class

LingotekWorkbenchModerationSettingsForm
Moderation settings form for the Lingotek workbench_moderation integration.

Namespace

Drupal\lingotek\Moderation

Code

public function submitHandler($entity_type_id, $bundle, array $form_values) {
  if (isset($form_values['moderation'])) {
    $upload_status = $form_values['moderation']['upload_status'];
    $download_transition = $form_values['moderation']['download_transition'];
    $this->moderationConfiguration
      ->setUploadStatus($entity_type_id, $bundle, $upload_status);
    $this->moderationConfiguration
      ->setDownloadTransition($entity_type_id, $bundle, $download_transition);
  }
}