Paragraphs Editor
Main Page
Namespaces
Classes
Files
File List
DeliveryProviderInterface.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Drupal\paragraphs_editor\Plugin\ParagraphsEditor
;
4
5
use
Drupal\Core\Ajax\AjaxResponse
;
6
use
Drupal\paragraphs_editor\WidgetBinder\WidgetBinderData
;
7
8
/**
9
* Represents a paragraphs editor form delivery plugin.
10
*
11
* Delivery Provider plugins are used to change the ajax behavior of the
12
* paragraphs editor editing experience. The default plugin delivers all forms
13
* to the user as a modal dialog. This is built on core functionality and is
14
* consistent with the way core handles other Editor dialogs, but it's not the
15
* only way to display a form.
16
*
17
* By implementing a delivery provider plugin you can expirement with different
18
* ajax behaviors for displaying forms to the user. This is built entirely on
19
* top of the Drupal Ajax API.
20
*/
21
interface
DeliveryProviderInterface
{
22
23
/**
24
* Navigates the user to a form.
25
*
26
* @param \Drupal\Core\Ajax\AjaxResponse $response
27
* The response object to add commands to.
28
* @param string $title
29
* The form title.
30
* @param mixed $contents
31
* The contents to be delivered to the user. This could be rendered markup
32
* or a render array.
33
*/
34
public
function
navigate
(AjaxResponse $response, $title, $contents);
35
36
/**
37
* Delivers widget binder data to the client.
38
*
39
* @param \Drupal\Core\Ajax\AjaxResponse $response
40
* The response object to add commands to.
41
* @param \Drupal\paragraphs_editor\WidgetBinder\WidgetBinderData $data
42
* The data to be delivered.
43
*/
44
public
function
sendData
(AjaxResponse $response,
WidgetBinderData
$data);
45
46
/**
47
* Closes a form for the user.
48
*
49
* @param \Drupal\Core\Ajax\AjaxResponse $response
50
* The response object to add commands to.
51
*/
52
public
function
close
(AjaxResponse $response);
53
54
}
Drupal\paragraphs_editor\Plugin\ParagraphsEditor\DeliveryProviderInterface\navigate
navigate(AjaxResponse $response, $title, $contents)
Drupal\paragraphs_editor\Plugin\ParagraphsEditor
WidgetBinderData
Drupal\paragraphs_editor\Plugin\ParagraphsEditor\DeliveryProviderInterface
Definition:
DeliveryProviderInterface.php:21
Drupal\paragraphs_editor\Plugin\ParagraphsEditor\DeliveryProviderInterface\close
close(AjaxResponse $response)
Drupal\paragraphs_editor\Plugin\ParagraphsEditor\DeliveryProviderInterface\sendData
sendData(AjaxResponse $response, WidgetBinderData $data)
Drupal\paragraphs_editor\WidgetBinder\WidgetBinderData
Definition:
WidgetBinderData.php:13
AjaxResponse
src
Plugin
ParagraphsEditor
DeliveryProviderInterface.php
Generated by
1.8.11