public function AdminUninstallForm::submitForm in Private Message 8
Same name and namespace in other branches
- 8.2 src/Form/AdminUninstallForm.php \Drupal\private_message\Form\AdminUninstallForm::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/ AdminUninstallForm.php, line 68
Class
- AdminUninstallForm
- Definest he admin uninstall form for the Private Message module.
Namespace
Drupal\private_message\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$batch = [
'title' => $this
->t('Deleting private message data'),
'operations' => [
[
[
__CLASS__,
'deletePrivateMessageAccessTimes',
],
[],
],
[
[
__CLASS__,
'deletePrivateMessageDeleteTimes',
],
[],
],
[
[
__CLASS__,
'deletePrivateMessageMessages',
],
[],
],
[
[
__CLASS__,
'deletePrivateMessageThreads',
],
[],
],
],
'progress_message' => static::t('Deleting private message data. Completed: @percentage% (@current of @total).'),
];
batch_set($batch);
drupal_set_message($this
->t('Private message data has been deleted.'));
}