Paragraphs Editor
Main Page
Namespaces
Classes
Files
File List
CloseModalCommand.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Drupal\paragraphs_editor\Ajax
;
4
5
use
Drupal\Core\Ajax\CloseModalDialogCommand
;
6
use
Drupal\paragraphs_editor\EditorCommand\CommandContextInterface
;
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
}
Drupal\paragraphs_editor\EditorCommand\CommandContextInterface
Definition:
CommandContextInterface.php:18
CommandContextInterface
Drupal\paragraphs_editor\Ajax\CloseModalCommand
Definition:
CloseModalCommand.php:11
Drupal\paragraphs_editor\EditorCommand\CommandContextInterface\getContextString
getContextString()
Drupal\paragraphs_editor\Ajax
Definition:
CloseModalCommand.php:3
CloseModalDialogCommand
Drupal\paragraphs_editor\Ajax\CloseModalCommand\__construct
__construct(CommandContextInterface $context, $persist=FALSE)
Definition:
CloseModalCommand.php:21
src
Ajax
CloseModalCommand.php
Generated by
1.8.11