You are here

public function OverviewForm::formGetAjaxOperation in Events Log Track 8

Same name and namespace in other branches
  1. 8.2 src/OverviewForm.php \Drupal\event_log_track\OverviewForm::formGetAjaxOperation()

Ajax callback for the operations options.

File

src/OverviewForm.php, line 199

Class

OverviewForm
Configure user settings for this site.

Namespace

Drupal\event_log_track

Code

public function formGetAjaxOperation(array &$form, FormStateInterface $form_state) {
  $ajax_response = new AjaxResponse();
  $element = EventLogStorage::formGetOperations($form_state
    ->getValue('type'));
  $ajax_response
    ->addCommand(new HtmlCommand('#operation-dropdown-replace', $element));
  return $ajax_response;
}