Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Drupal\display_builder; |
6 | |
7 | /** |
8 | * Interface for island event subscriber. |
9 | */ |
10 | interface IslandEventSubscriberInterface { |
11 | |
12 | /** |
13 | * Event triggered when a block becomes active. |
14 | * |
15 | * @param string $builder_id |
16 | * The builder ID. |
17 | * @param array $data |
18 | * The block data. |
19 | * |
20 | * @return array |
21 | * Returns a render array with out-of-band commands. |
22 | */ |
23 | public function onActive(string $builder_id, array $data): array; |
24 | |
25 | /** |
26 | * Event triggered when a block is attached to the root. |
27 | * |
28 | * @param string $builder_id |
29 | * The builder ID. |
30 | * @param string $instance_id |
31 | * The instance ID. |
32 | * |
33 | * @return array |
34 | * Returns a render array with out-of-band commands. |
35 | */ |
36 | public function onAttachToRoot(string $builder_id, string $instance_id): array; |
37 | |
38 | /** |
39 | * Event triggered when a block is attached to a slot. |
40 | * |
41 | * @param string $builder_id |
42 | * The builder ID. |
43 | * @param string $instance_id |
44 | * The instance ID. |
45 | * @param string $parent_id |
46 | * The parent block instance ID. |
47 | * |
48 | * @return array |
49 | * Returns a render array with out-of-band commands. |
50 | */ |
51 | public function onAttachToSlot(string $builder_id, string $instance_id, string $parent_id): array; |
52 | |
53 | /** |
54 | * Event triggered when a block is deleted. |
55 | * |
56 | * @param string $builder_id |
57 | * The builder ID. |
58 | * @param string $parent_id |
59 | * The parent block instance ID. |
60 | * |
61 | * @return array |
62 | * Returns a render array with out-of-band commands. |
63 | */ |
64 | public function onDelete(string $builder_id, string $parent_id): array; |
65 | |
66 | /** |
67 | * Event triggered when the history changes. |
68 | * |
69 | * @param string $builder_id |
70 | * The builder ID. |
71 | * |
72 | * @return array |
73 | * Returns a render array with out-of-band commands. |
74 | */ |
75 | public function onHistoryChange(string $builder_id): array; |
76 | |
77 | /** |
78 | * Event triggered when a block is moved. |
79 | * |
80 | * @param string $builder_id |
81 | * The builder ID. |
82 | * @param string $instance_id |
83 | * The instance ID. |
84 | * |
85 | * @return array |
86 | * Returns a render array with out-of-band commands. |
87 | */ |
88 | public function onMove(string $builder_id, string $instance_id): array; |
89 | |
90 | /** |
91 | * Event triggered when a block is updated. |
92 | * |
93 | * @param string $builder_id |
94 | * The builder ID. |
95 | * @param string $instance_id |
96 | * The instance ID. |
97 | * |
98 | * @return array |
99 | * Returns a render array with out-of-band commands. |
100 | */ |
101 | public function onUpdate(string $builder_id, string $instance_id): array; |
102 | |
103 | /** |
104 | * Event triggered when a builder is saved. |
105 | * |
106 | * @param string $builder_id |
107 | * The builder ID. |
108 | * |
109 | * @return array |
110 | * Returns a render array with out-of-band commands. |
111 | */ |
112 | public function onSave(string $builder_id): array; |
113 | |
114 | /** |
115 | * Event triggered when a preset is saved. |
116 | * |
117 | * @param string $builder_id |
118 | * The builder ID. |
119 | * |
120 | * @return array |
121 | * Returns a render array with out-of-band commands. |
122 | */ |
123 | public function onPresetSave(string $builder_id): array; |
124 | |
125 | } |