public FormAjaxResponseBuilderInterface::buildResponse(Request $request, array $form, FormStateInterface $form_state, array $commands)
Builds a response for an AJAX form.
\Symfony\Component\HttpFoundation\Request $request: The current request.
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
array $commands: An array of AJAX commands to apply to the form.
\Drupal\Core\Ajax\AjaxResponse An AJAX response representing the form and its AJAX commands.
\Symfony\Component\HttpKernel\Exception\HttpException Thrown if the AJAX callback is not a callable.
public function buildResponse(Request $request, array $form, FormStateInterface $form_state, array $commands);
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Form!FormAjaxResponseBuilderInterface.php/function/FormAjaxResponseBuilderInterface::buildResponse/8.1.x