You are here

protected function WebformAjaxFormTrait::isDialog in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Form/WebformAjaxFormTrait.php \Drupal\webform\Form\WebformAjaxFormTrait::isDialog()

Is the current request for an Ajax modal/dialog.

Return value

bool TRUE if the current request is for an Ajax modal/dialog.

15 calls to WebformAjaxFormTrait::isDialog()
WebformConfigEntityDeleteFormBase::getQuestion in src/Form/WebformConfigEntityDeleteFormBase.php
Returns the question to ask the user.
WebformDevelEntityFormApiTestForm::submitForm in modules/webform_devel/src/Form/WebformDevelEntityFormApiTestForm.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…
WebformDialogFormTrait::buildDialogConfirmForm in src/Form/WebformDialogFormTrait.php
Add modal dialog support to a confirm form.
WebformDialogFormTrait::buildDialogDeleteAction in src/Form/WebformDialogFormTrait.php
Build webform dialog delete link.
WebformDialogFormTrait::isAjax in src/Form/WebformDialogFormTrait.php
Returns if webform is using Ajax.

... See full list

File

src/Form/WebformAjaxFormTrait.php, line 75

Class

WebformAjaxFormTrait
Trait class for Webform Ajax support.

Namespace

Drupal\webform\Form

Code

protected function isDialog() {
  $wrapper_format = $this
    ->getRequest()
    ->get(MainContentViewSubscriber::WRAPPER_FORMAT);
  return in_array($wrapper_format, [
    'drupal_ajax',
    'drupal_modal',
    'drupal_dialog',
    'drupal_dialog.off_canvas',
  ]) ? TRUE : FALSE;
}