You are here

protected function WebformAjaxFormTrait::isOffCanvasDialog in Webform 6.x

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

Is the current request for an off canvas dialog.

Return value

bool TRUE if the current request is for an off canvas dialog.

3 calls to WebformAjaxFormTrait::isOffCanvasDialog()
WebformDialogFormTrait::buildDialogConfirmForm in src/Form/WebformDialogFormTrait.php
Add modal dialog support to a confirm form.
WebformUiElementTypeFormBase::buildForm in modules/webform_ui/src/Form/WebformUiElementTypeFormBase.php
Form constructor.
WebformUiElementTypeFormBase::isPreviewEnabled in modules/webform_ui/src/Form/WebformUiElementTypeFormBase.php
Determine if webform element type preview is enabled.

File

src/Form/WebformAjaxFormTrait.php, line 92

Class

WebformAjaxFormTrait
Trait for webform ajax support.

Namespace

Drupal\webform\Form

Code

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