Paragraphs Editor
CloseModalCommand.php
Go to the documentation of this file.
1 <?php
2 
4 
7 
8 /**
9  * Closes an ajax dialog for a specific editor context.
10  */
11 class CloseModalCommand extends CloseModalDialogCommand {
12 
13  /**
14  * Creates a CloseModelCommand.
15  *
16  * @param \Drupal\paragraphs_editor\EditorCommand\CommandContextInterface $context
17  * The context to close the dialog for.
18  * @param bool $persist
19  * (optional) Whether to persist the dialog in the DOM or not.
20  */
21  public function __construct(CommandContextInterface $context, $persist = FALSE) {
22  parent::__construct($persist);
23  $this->selector = '#paragraphs-ckeditor-modal-' . md5($context->getContextString());
24  }
25 
26 }
__construct(CommandContextInterface $context, $persist=FALSE)