You are here

public function LingotekContentModerationSettingsForm::submitHandler in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 8.2 src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::submitHandler()
  2. 3.0.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::submitHandler()
  3. 3.1.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::submitHandler()
  4. 3.2.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::submitHandler()
  5. 3.3.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::submitHandler()
  6. 3.4.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::submitHandler()
  7. 3.5.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::submitHandler()
  8. 3.6.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::submitHandler()
  9. 3.7.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::submitHandler()
  10. 3.8.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::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/LingotekContentModerationSettingsForm.php, line 286

Class

LingotekContentModerationSettingsForm
Moderation settings form for the Lingotek content_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);
  }
}