public function CandidateRevisionsNodeForm::submitForm in Node Revision Delete 8
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/ CandidateRevisionsNodeForm.php, line 217
Class
- CandidateRevisionsNodeForm
- Class CandidateRevisionsForm.
Namespace
Drupal\node_revision_delete\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// Get selected revisions.
$candidate_revisions = array_filter($form_state
->getValue('candidate_revisions'));
if (count($candidate_revisions)) {
// Add the batch.
batch_set($this->nodeRevisionDelete
->getRevisionDeletionBatch($candidate_revisions, FALSE));
}
}