public function AuditFilesMergeFileReferences::submissionHandlerMergeRecordPreConfirm in Audit Files 8.3
Same name and namespace in other branches
- 8 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 417
Class
- AuditFilesMergeFileReferences
- Form for merge file references.
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();
}
}
}
}