CloseModalDialogCommand.php 486 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace Drupal\Core\Ajax;
  3. /**
  4. * Defines an AJAX command that closes the currently visible modal dialog.
  5. *
  6. * @ingroup ajax
  7. */
  8. class CloseModalDialogCommand extends CloseDialogCommand {
  9. /**
  10. * Constructs a CloseModalDialogCommand object.
  11. *
  12. * @param bool $persist
  13. * (optional) Whether to persist the dialog in the DOM or not.
  14. */
  15. public function __construct($persist = FALSE) {
  16. $this->selector = '#drupal-modal';
  17. $this->persist = $persist;
  18. }
  19. }