You are here

protected function ComponentFormBase::ajaxCloseForm in Layout Paragraphs 2.0.x

Closes the form with ajax.

Parameters

\Drupal\Core\Ajax\AjaxResponse $response: The ajax response.

3 calls to ComponentFormBase::ajaxCloseForm()
ComponentFormBase::cancel in src/Form/ComponentFormBase.php
Form #ajax callback.
EditComponentForm::successfulAjaxSubmit in src/Form/EditComponentForm.php
Allows the form to respond to a successful AJAX submission.
InsertComponentForm::successfulAjaxSubmit in src/Form/InsertComponentForm.php
Allows the form to respond to a successful AJAX submission.

File

src/Form/ComponentFormBase.php, line 462

Class

ComponentFormBase
Class LayoutParagraphsComponentFormBase.

Namespace

Drupal\layout_paragraphs\Form

Code

protected function ajaxCloseForm(AjaxResponse &$response) {
  $selector = $this
    ->dialogSelector($this->layoutParagraphsLayout);
  $response
    ->addCommand(new CloseDialogCommand($selector));
}