You are here

public function ConstraintEdit::ajaxSave in Password Policy 8.3

File

src/Form/ConstraintEdit.php, line 163

Class

ConstraintEdit
Editing a constraint within the policy wizard form.

Namespace

Drupal\password_policy\Form

Code

public function ajaxSave(array &$form, FormStateInterface $form_state) {
  $response = new AjaxResponse();
  $url = Url::fromRoute('entity.password_policy.wizard.edit', [
    'machine_name' => $this->machineName,
    'step' => 'constraint',
  ]);
  $response
    ->addCommand(new RedirectCommand($url
    ->toString()));
  $response
    ->addCommand(new CloseModalDialogCommand());
  return $response;
}