function MediaTypeForm::ajaxHandlerData

Same name in other branches
  1. 9 core/modules/media/src/MediaTypeForm.php \Drupal\media\MediaTypeForm::ajaxHandlerData()
  2. 8.9.x core/modules/media/src/MediaTypeForm.php \Drupal\media\MediaTypeForm::ajaxHandlerData()
  3. 10 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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.