class CloseModalDialogCommand in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Ajax/CloseModalDialogCommand.php \Drupal\Core\Ajax\CloseModalDialogCommand
Defines an AJAX command that closes the currently visible modal dialog.
Hierarchy
- class \Drupal\Core\Ajax\CloseDialogCommand implements CommandInterface
- class \Drupal\Core\Ajax\CloseModalDialogCommand
Expanded class hierarchy of CloseModalDialogCommand
Related topics
4 files declare their use of CloseModalDialogCommand
- AjaxCommandsTest.php in core/
tests/ Drupal/ Tests/ Core/ Ajax/ AjaxCommandsTest.php - Contains \Drupal\Tests\Core\Ajax\AjaxCommandsTest.
- EditorImageDialog.php in core/
modules/ editor/ src/ Form/ EditorImageDialog.php - Contains \Drupal\editor\Form\EditorImageDialog.
- EditorLinkDialog.php in core/
modules/ editor/ src/ Form/ EditorLinkDialog.php - Contains \Drupal\editor\Form\EditorLinkDialog.
- ViewsFormBase.php in core/
modules/ views_ui/ src/ Form/ Ajax/ ViewsFormBase.php - Contains \Drupal\views_ui\Form\Ajax\ViewsFormBase.
File
- core/
lib/ Drupal/ Core/ Ajax/ CloseModalDialogCommand.php, line 15 - Contains \Drupal\Core\Ajax\CloseModalDialogCommand.
Namespace
Drupal\Core\AjaxView source
class CloseModalDialogCommand extends CloseDialogCommand {
/**
* Constructs a CloseModalDialogCommand object.
*
* @param bool $persist
* (optional) Whether to persist the dialog in the DOM or not.
*/
public function __construct($persist = FALSE) {
$this->selector = '#drupal-modal';
$this->persist = $persist;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CloseDialogCommand:: |
protected | property | Whether to persist the dialog in the DOM or not. | |
CloseDialogCommand:: |
protected | property | A CSS selector string of the dialog to close. | |
CloseDialogCommand:: |
public | function |
Return an array to be run through json_encode and sent to the client. Overrides CommandInterface:: |
|
CloseModalDialogCommand:: |
public | function |
Constructs a CloseModalDialogCommand object. Overrides CloseDialogCommand:: |