public function BatchUpdateForm::submitForm in Entity Usage 8.3
Same name and namespace in other branches
- 8 src/Form/BatchUpdateForm.php \Drupal\entity_usage\Form\BatchUpdateForm::submitForm()
- 8.2 src/Form/BatchUpdateForm.php \Drupal\entity_usage\Form\BatchUpdateForm::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/ BatchUpdateForm.php, line 69
Class
- BatchUpdateForm
- Form to launch batch tracking of existing entities.
Namespace
Drupal\entity_usage\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// Generate a batch to recreate the statistics for all entities.
// Note that if we force all statistics to be created, there is no need to
// separate them between source / target cases. If all entities are
// going to be re-tracked, tracking all of them as source is enough, because
// there could never be a target without a source.
$batch = $this
->generateBatch();
batch_set($batch);
}