FormAjaxResponseBuilder
class FormAjaxResponseBuilder implements FormAjaxResponseBuilderInterface (View source)
Builds an AJAX form response.
Given the current request, a form render array, its form state, and any AJAX commands to apply to the form, build a response object.
Properties
| protected MainContentRendererInterface | $ajaxRenderer | The main content to AJAX Response renderer. |
|
| protected RouteMatchInterface | $routeMatch | The current route match. |
Methods
__construct(MainContentRendererInterface $ajax_renderer, RouteMatchInterface $route_match)
Constructs a new FormAjaxResponseBuilder.
buildResponse(Request $request, array $form, FormStateInterface $form_state, array $commands)
Builds a response for an AJAX form.
Details
__construct(MainContentRendererInterface $ajax_renderer, RouteMatchInterface $route_match)
Constructs a new FormAjaxResponseBuilder.
AjaxResponse
buildResponse(Request $request, array $form, FormStateInterface $form_state, array $commands)
Builds a response for an AJAX form.