You are here

protected function ContributeSettingsForm::isModal in Contribute 8

Determine if this form is being displayed in a modal dialog.

Return value

bool TRUE is the form is being display in a modal dialog.

1 call to ContributeSettingsForm::isModal()
ContributeSettingsForm::buildForm in src/Form/ContributeSettingsForm.php
Form constructor.

File

src/Form/ContributeSettingsForm.php, line 281

Class

ContributeSettingsForm
Configure contribute settings for this site.

Namespace

Drupal\contribute\Form

Code

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