public function LingotekInterfaceTranslationClearMetadataForm::submitForm in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 4.0.x src/Form/LingotekInterfaceTranslationClearMetadataForm.php \Drupal\lingotek\Form\LingotekInterfaceTranslationClearMetadataForm::submitForm()
- 3.2.x src/Form/LingotekInterfaceTranslationClearMetadataForm.php \Drupal\lingotek\Form\LingotekInterfaceTranslationClearMetadataForm::submitForm()
- 3.3.x src/Form/LingotekInterfaceTranslationClearMetadataForm.php \Drupal\lingotek\Form\LingotekInterfaceTranslationClearMetadataForm::submitForm()
- 3.5.x src/Form/LingotekInterfaceTranslationClearMetadataForm.php \Drupal\lingotek\Form\LingotekInterfaceTranslationClearMetadataForm::submitForm()
- 3.6.x src/Form/LingotekInterfaceTranslationClearMetadataForm.php \Drupal\lingotek\Form\LingotekInterfaceTranslationClearMetadataForm::submitForm()
- 3.7.x src/Form/LingotekInterfaceTranslationClearMetadataForm.php \Drupal\lingotek\Form\LingotekInterfaceTranslationClearMetadataForm::submitForm()
- 3.8.x src/Form/LingotekInterfaceTranslationClearMetadataForm.php \Drupal\lingotek\Form\LingotekInterfaceTranslationClearMetadataForm::submitForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- src/
Form/ LingotekInterfaceTranslationClearMetadataForm.php, line 80
Class
- LingotekInterfaceTranslationClearMetadataForm
- Provides a form to disconnect from Lingotek.
Namespace
Drupal\lingotek\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->lingotekInterfaceTranslation
->deleteAllMetadata();
$this
->logger('lingotek')
->notice('Cleared interface translation Lingotek metadata.');
$this
->messenger()
->addStatus($this
->t('You have cleared the Lingotek metadata for interface translations.'));
$form_state
->setRedirectUrl($this
->getCancelUrl());
}