You are here

public function SettingsForm::processAjax in Image Effects 8.3

Same name and namespace in other branches
  1. 8 src/Form/SettingsForm.php \Drupal\image_effects\Form\SettingsForm::processAjax()
  2. 8.2 src/Form/SettingsForm.php \Drupal\image_effects\Form\SettingsForm::processAjax()

AJAX callback.

File

src/Form/SettingsForm.php, line 237

Class

SettingsForm
Main image_effects settings admin form.

Namespace

Drupal\image_effects\Form

Code

public function processAjax($form, FormStateInterface $form_state) {
  $response = new AjaxResponse();
  $status_messages = [
    '#type' => 'status_messages',
  ];
  $response
    ->addCommand(new HtmlCommand('#image-effects-ajax-messages', $status_messages));
  $response
    ->addCommand(new HtmlCommand('#image-effects-settings-main', $form['settings']));
  return $response;
}