public function RelationshipConfigure::ajaxSave in Chaos Tool Suite (ctools) 8.3
Parameters
array $form:
\Drupal\Core\Form\FormStateInterface $form_state:
Return value
\Drupal\Core\Ajax\AjaxResponse
File
- src/
Form/ RelationshipConfigure.php, line 113
Class
Namespace
Drupal\ctools\FormCode
public function ajaxSave(array &$form, FormStateInterface $form_state) {
$cached_values = $this->tempstore
->get($this->tempstore_id)
->get($this->machine_name);
list($route_name, $route_parameters) = $this
->getParentRouteInfo($cached_values);
$response = new AjaxResponse();
$url = Url::fromRoute($route_name, $route_parameters);
$response
->addCommand(new RedirectCommand($url
->toString()));
$response
->addCommand(new CloseModalDialogCommand());
return $response;
}