public function MetaTagDownloadForm::getBundlesList in Metatag Import Export CSV 8
Ajax callback for entity type field.
File
- src/
Form/ MetaTagDownloadForm.php, line 98
Class
- MetaTagDownloadForm
- Defines a form that configures forms module settings.
Namespace
Drupal\metatag_import_export_csv\FormCode
public function getBundlesList($form, FormStateInterface &$form_state) {
$ajax_response = new AjaxResponse();
$entity_type = $form_state
->getValue('entity_type');
$form['bundles']['#options'] = $this
->getBundles($entity_type);
$ajax_response
->addCommand(new ReplaceCommand('.form-item-bundles', $form['bundles']));
return $ajax_response;
}