public function FancyFileDeleteManual::_submitForm in Fancy File Delete 8
Same name and namespace in other branches
- 2.0.x src/Form/FancyFileDeleteManual.php \Drupal\fancy_file_delete\Form\FancyFileDeleteManual::_submitForm()
1 call to FancyFileDeleteManual::_submitForm()
- FancyFileDeleteManual::submitForm in src/
Form/ FancyFileDeleteManual.php - Form submission handler.
File
- src/
Form/ FancyFileDeleteManual.php, line 79
Class
Namespace
Drupal\fancy_file_delete\FormCode
public function _submitForm(array &$form, \Drupal\Core\Form\FormStateInterface $form_state) {
$operations = [];
$force = $form_state
->getValue([
'force',
]) ? true : false;
$fids = preg_split("/\r?\n/", $form_state
->getValue([
'delete_textarea',
]));
foreach ($fids as $fid) {
$operations[] = [
'fancy_file_delete_batch',
[
$fid,
$force,
],
];
}
// Send to batch.
_fancy_file_delete_batch_run($operations);
}