CloseModalDialogCommand.php 559 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
<?php

/**
 * @file
 * Contains \Drupal\Core\Ajax\CloseModalDialogCommand.
 */

namespace Drupal\Core\Ajax;

/**
 * Defines an AJAX command that closes the currently visible modal dialog.
12 13
 *
 * @ingroup ajax
14 15
 */
class CloseModalDialogCommand extends CloseDialogCommand {
16

17 18
  /**
   * Constructs a CloseModalDialogCommand object.
19 20 21
   *
   * @param bool $persist
   *   (optional) Whether to persist the dialog in the DOM or not.
22
   */
23
  public function __construct($persist = FALSE) {
24
    $this->selector = '#drupal-modal';
25
    $this->persist = $persist;
26
  }
27

28
}