You are here

public function FileActionForm::submitForm in Ubercart 8.4

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

uc_file/src/Form/FileActionForm.php, line 149

Class

FileActionForm
Form builder for file products admin.

Namespace

Drupal\uc_file\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  switch ($form_state
    ->getValue('action')) {
    case 'uc_file_delete':
      $form_state
        ->setRedirect('uc_file.delete');
      break;
    case 'uc_file_upload':
      $form_state
        ->setRedirect('uc_file.upload');
      break;
    default:

      // @todo Deal with submitting hook-provided actions.
      break;
  }
}