You are here

public function ContextConfigure::ajaxSave in Chaos Tool Suite (ctools) 8.3

File

src/Form/ContextConfigure.php, line 208

Class

ContextConfigure

Namespace

Drupal\ctools\Form

Code

public function ajaxSave(array &$form, FormStateInterface $form_state) {
  $response = new AjaxResponse();
  $cached_values = $this->tempstore
    ->get($this->tempstore_id)
    ->get($this->machine_name);
  list($route_name, $route_parameters) = $this
    ->getParentRouteInfo($cached_values);
  $url = new Url($route_name, $route_parameters);
  $response
    ->addCommand(new RedirectCommand($url
    ->toString()));
  $response
    ->addCommand(new CloseModalDialogCommand());
  return $response;
}