You are here

public function ComponentFormBase::cancel in Layout Paragraphs 2.0.x

Form #ajax callback.

Cancels the edit operation and closes the dialog.

Parameters

array $form: The form array.

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

Return value

Drupal\Core\Ajax\AjaxResponse The Ajax response.

File

src/Form/ComponentFormBase.php, line 438

Class

ComponentFormBase
Class LayoutParagraphsComponentFormBase.

Namespace

Drupal\layout_paragraphs\Form

Code

public function cancel(array &$form, FormStateInterface $form_state) {
  $response = new AjaxResponse();
  $this
    ->ajaxCloseForm($response);
  return $response;
}