You are here

class WebformCloseDialogCommand in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Ajax/WebformCloseDialogCommand.php \Drupal\webform\Ajax\WebformCloseDialogCommand

Provides an Ajax command for closing webform dialog and system tray.

This command is implemented in Drupal.AjaxCommands.prototype.webformCloseDialog.

Hierarchy

Expanded class hierarchy of WebformCloseDialogCommand

1 file declares its use of WebformCloseDialogCommand
WebformAjaxFormTrait.php in src/Form/WebformAjaxFormTrait.php

File

src/Ajax/WebformCloseDialogCommand.php, line 12

Namespace

Drupal\webform\Ajax
View source
class WebformCloseDialogCommand extends CloseDialogCommand {

  /**
   * {@inheritdoc}
   */
  public function render() {
    return [
      'command' => 'webformCloseDialog',
      'selector' => $this->selector,
      'persist' => $this->persist,
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CloseDialogCommand::$persist protected property Whether to persist the dialog in the DOM or not.
CloseDialogCommand::$selector protected property A CSS selector string of the dialog to close.
CloseDialogCommand::__construct public function Constructs a CloseDialogCommand object. 1
WebformCloseDialogCommand::render public function Return an array to be run through json_encode and sent to the client. Overrides CloseDialogCommand::render