You are here

public function MediaTypeForm::ajaxHandlerData in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/media/src/MediaTypeForm.php \Drupal\media\MediaTypeForm::ajaxHandlerData()

Ajax callback triggered by the type provider select element.

File

core/modules/media/src/MediaTypeForm.php, line 76

Class

MediaTypeForm
Form controller for media type forms.

Namespace

Drupal\media

Code

public function ajaxHandlerData(array $form, FormStateInterface $form_state) {
  $response = new AjaxResponse();
  $response
    ->addCommand(new ReplaceCommand('#source-dependent', $form['source_dependent']));
  return $response;
}