public function CloseDialogCommand::__construct

public CloseDialogCommand::__construct($selector = NULL, $persist = FALSE)

Constructs a CloseDialogCommand object.

Parameters

string $selector: A CSS selector string of the dialog to close.

bool $persist: (optional) Whether to persist the dialog in the DOM or not.

File

core/lib/Drupal/Core/Ajax/CloseDialogCommand.php, line 34

Class

CloseDialogCommand
Defines an AJAX command that closes the current active dialog.

Namespace

Drupal\Core\Ajax

Code

public function __construct($selector = NULL, $persist = FALSE) {
  $this->selector = $selector ? $selector : '#drupal-modal';
  $this->persist = $persist;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Ajax!CloseDialogCommand.php/function/CloseDialogCommand::__construct/8.1.x