You are here

public function LingotekDisassociateAllConfirmForm::disassociateAllTranslations in Lingotek Translation 3.8.x

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

Disassociate all content and config translations.

1 call to LingotekDisassociateAllConfirmForm::disassociateAllTranslations()
LingotekDisassociateAllConfirmForm::submitForm in src/Form/LingotekDisassociateAllConfirmForm.php
Form submission handler.

File

src/Form/LingotekDisassociateAllConfirmForm.php, line 115

Class

LingotekDisassociateAllConfirmForm
Show a warning before disassociate all content.

Namespace

Drupal\lingotek\Form

Code

public function disassociateAllTranslations() {
  $error = FALSE;
  $error &= $this
    ->disassociateAllContentTranslations();
  $error &= $this
    ->disassociateAllConfigTranslations();
  if ($error) {
    $this
      ->messenger()
      ->addWarning($this
      ->t('Some translations may have been disassociated, but some failed.'));
  }
  else {
    $this
      ->messenger()
      ->addStatus($this
      ->t('All translations have been disassociated.'));
  }
}