SetFormCommand example

$options = [
        'dialogClass' => 'views-ui-dialog js-views-ui-dialog',
        'width' => '75%',
      ];

      $response->addCommand(new OpenModalDialogCommand($title$display$options));

      // Views provides its own custom handling of AJAX form submissions.       // Usually this happens at the same path, but custom paths may be       // specified in $form_state.       $form_url = $form_state->has('url') ? $form_state->get('url')->toString() : Url::fromRoute('<current>')->toString();
      $response->addCommand(new SetFormCommand($form_url));

      if ($section = $form_state->get('#section')) {
        $response->addCommand(new HighlightCommand('.' . Html::cleanCssIdentifier($section)));
      }

      return $response;
    }

    return $title ? ['#title' => $title, '#markup' => $output] : $output;
  }

  
Home | Imprint | This part of the site doesn't use cookies.