public function AuditFilesMergeFileReferences::submissionHandlerMergeRecordPreConfirm in Audit Files 8
Same name and namespace in other branches
- 8.3 src/Form/AuditFilesMergeFileReferences.php \Drupal\auditfiles\Form\AuditFilesMergeFileReferences::submissionHandlerMergeRecordPreConfirm()
- 8.2 src/Form/AuditFilesMergeFileReferences.php \Drupal\auditfiles\Form\AuditFilesMergeFileReferences::submissionHandlerMergeRecordPreConfirm()
- 4.x src/Form/AuditFilesMergeFileReferences.php \Drupal\auditfiles\Form\AuditFilesMergeFileReferences::submissionHandlerMergeRecordPreConfirm()
Preconfirm form submission.
File
- src/
Form/ AuditFilesMergeFileReferences.php, line 332
Class
Namespace
Drupal\auditfiles\FormCode
public function submissionHandlerMergeRecordPreConfirm(array &$form, FormStateInterface $form_state) {
if (!empty($form_state
->getValue('files_being_merged'))) {
foreach ($form_state
->getValue('files_being_merged') as $file_id) {
if (!empty($file_id)) {
$storage = [
'files_being_merged' => $form_state
->getValue('files_being_merged'),
'confirm' => TRUE,
'stage' => 'confirm',
];
$form_state
->setStorage($storage);
$form_state
->setRebuild();
}
}
}
}