You are here

public function CKEditorEntityLinkDialog::updateTypeSettings in CKEditor Entity Link 8

Ajax callback to update the form fields which depend on embed type.

Parameters

array $form: The build form.

\Drupal\Core\Form\FormStateInterface $form_state: The form state.

Return value

\Drupal\Core\Ajax\AjaxResponse Ajax response with updated options for the embed type.

File

src/Form/CKEditorEntityLinkDialog.php, line 232

Class

CKEditorEntityLinkDialog
Provides a link dialog for text editors.

Namespace

Drupal\ckeditor_entity_link\Form

Code

public function updateTypeSettings(array &$form, FormStateInterface $form_state) {
  $response = new AjaxResponse();

  // Update options for entity type bundles.
  $response
    ->addCommand(new ReplaceCommand('#entity-id-wrapper', $form['entity_id']));
  return $response;
}