You are here

class GeysirCloseModalDialogCommand in Geysir 8

Defines an AJAX command that closes the currently visible Geysir modal.

Hierarchy

Expanded class hierarchy of GeysirCloseModalDialogCommand

1 file declares its use of GeysirCloseModalDialogCommand
GeysirModalParagraphForm.php in src/Form/GeysirModalParagraphForm.php

File

src/Ajax/GeysirCloseModalDialogCommand.php, line 12

Namespace

Drupal\geysir\Ajax
View source
class GeysirCloseModalDialogCommand extends CloseDialogCommand {

  /**
   * Constructs a GeysirCloseModalDialogCommand object.
   *
   * @param bool $persist
   *   (optional) Whether to persist the dialog in the DOM or not.
   */
  public function __construct($persist = FALSE) {
    $this->selector = GeysirOpenModalDialogCommand::MODAL_SELECTOR;
    $this->persist = $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::render public function Return an array to be run through json_encode and sent to the client. Overrides CommandInterface::render
GeysirCloseModalDialogCommand::__construct public function Constructs a GeysirCloseModalDialogCommand object. Overrides CloseDialogCommand::__construct