You are here

public function AuditFilesReferencedNotUsed::confirmSubmissionHandler in Audit Files 8

Same name and namespace in other branches
  1. 8.2 src/Form/AuditFilesReferencedNotUsed.php \Drupal\auditfiles\Form\AuditFilesReferencedNotUsed::confirmSubmissionHandler()

Delete record from files.

File

src/Form/AuditFilesReferencedNotUsed.php, line 237

Class

AuditFilesReferencedNotUsed

Namespace

Drupal\auditfiles\Form

Code

public function confirmSubmissionHandler(array &$form, FormStateInterface $form_state) {
  $storage =& $form_state
    ->getStorage();
  if ($storage['op'] == 'add') {
    batch_set(\Drupal::service('auditfiles.referenced_not_used')
      ->_auditfiles_referenced_not_used_batch_add_create_batch($form_state
      ->getValue('changelist')));
  }
  else {
    batch_set(\Drupal::service('auditfiles.referenced_not_used')
      ->_auditfiles_referenced_not_used_batch_delete_create_batch($form_state
      ->getValue('changelist')));
  }
}