You are here

protected function YamlFormDialogTrait::isModalDialog in YAML Form 8

Is the current request for an AJAX modal dialog.

Return value

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

8 calls to YamlFormDialogTrait::isModalDialog()
YamlFormDialogTrait::buildDialog in src/YamlFormDialogTrait.php
Add modal dialog support to a form.
YamlFormDialogTrait::redirectForm in src/YamlFormDialogTrait.php
Handler dialog redirect after form is submitted.
YamlFormDialogTrait::validateDialog in src/YamlFormDialogTrait.php
Display validation error messages in modal dialog.
YamlFormEntityForm::submitForm in src/YamlFormEntityForm.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…
YamlFormSubmissionForm::getCustomForm in src/YamlFormSubmissionForm.php
Get custom form which is displayed instead of the form's elements.

... See full list

File

src/YamlFormDialogTrait.php, line 23

Class

YamlFormDialogTrait
Trait class form dialogs.

Namespace

Drupal\yamlform

Code

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