Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5namespace Drupal\display_builder\Controller;
6
7use Drupal\display_builder\InstanceInterface;
8use Symfony\Component\HttpFoundation\Request;
9
10/**
11 * HTTP controller for the REST API.
12 */
13interface ApiControllerInterface {
14
15  /**
16   * Attach a component_id, a block_id, or an existing source, to the root.
17   *
18   * @param \Symfony\Component\HttpFoundation\Request $request
19   *   HTTP Request.
20   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
21   *   Display builder instance.
22   *
23   * @return array
24   *   A renderable array
25   */
26  public function attachToRoot(Request $request, InstanceInterface $display_builder_instance): array;
27
28  /**
29   * Attach a component_id, a block_id, or an source, to a component slot.
30   *
31   * @param \Symfony\Component\HttpFoundation\Request $request
32   *   HTTP Request.
33   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
34   *   Display builder instance.
35   * @param string $node_id
36   *   Node ID of the parent.
37   * @param string $slot
38   *   Slot.
39   *
40   * @return array
41   *   A renderable array
42   */
43  public function attachToSlot(Request $request, InstanceInterface $display_builder_instance, string $node_id, string $slot): array;
44
45  /**
46   * Open source's contextual islands.
47   *
48   * @param \Symfony\Component\HttpFoundation\Request $request
49   *   HTTP Request.
50   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
51   *   Display builder instance.
52   * @param string $node_id
53   *   Node ID of the source.
54   *
55   * @return array
56   *   The render array response.
57   */
58  public function get(Request $request, InstanceInterface $display_builder_instance, string $node_id): array;
59
60  /**
61   * Update source.
62   *
63   * @param \Symfony\Component\HttpFoundation\Request $request
64   *   HTTP Request.
65   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
66   *   Display builder instance.
67   * @param string $node_id
68   *   Node ID of the source.
69   *
70   * @return array
71   *   A renderable array
72   */
73  public function update(Request $request, InstanceInterface $display_builder_instance, string $node_id): array;
74
75  /**
76   * Update source's 3rd party settings.
77   *
78   * @param \Symfony\Component\HttpFoundation\Request $request
79   *   HTTP Request.
80   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
81   *   Display builder instance.
82   * @param string $node_id
83   *   Node ID of the source.
84   * @param string $island_id
85   *   Island ID.
86   *
87   * @return array
88   *   A renderable array
89   */
90  public function thirdPartySettingsUpdate(Request $request, InstanceInterface $display_builder_instance, string $node_id, string $island_id): array;
91
92  /**
93   * Paste a source.
94   *
95   * @param \Symfony\Component\HttpFoundation\Request $request
96   *   HTTP Request.
97   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
98   *   Display builder instance.
99   * @param string $node_id
100   *   Node ID of the source.
101   * @param string $parent_id
102   *   Parent ID.
103   * @param string $slot_id
104   *   Slot ID.
105   * @param string $slot_position
106   *   Slot position.
107   *
108   * @return array
109   *   A renderable array
110   */
111  public function paste(Request $request, InstanceInterface $display_builder_instance, string $node_id, string $parent_id, string $slot_id, string $slot_position): array;
112
113  /**
114   * Delete a source.
115   *
116   * @param \Symfony\Component\HttpFoundation\Request $request
117   *   HTTP Request.
118   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
119   *   Display builder instance.
120   * @param string $node_id
121   *   Node ID of the source to delete.
122   *
123   * @return array
124   *   A renderable array
125   */
126  public function delete(Request $request, InstanceInterface $display_builder_instance, string $node_id): array;
127
128  /**
129   * Save a source as preset.
130   *
131   * @param \Symfony\Component\HttpFoundation\Request $request
132   *   HTTP Request.
133   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
134   *   Display builder instance.
135   * @param string $node_id
136   *   Node ID of the source to save.
137   *
138   * @return array
139   *   A renderable array
140   */
141  public function saveAsPreset(Request $request, InstanceInterface $display_builder_instance, string $node_id): array;
142
143  /**
144   * Save display builder instance.
145   *
146   * @param \Symfony\Component\HttpFoundation\Request $request
147   *   HTTP Request.
148   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
149   *   Display builder instance.
150   *
151   * @return array
152   *   A renderable array
153   */
154  public function save(Request $request, InstanceInterface $display_builder_instance): array;
155
156  /**
157   * Restore to last save.
158   *
159   * @param \Symfony\Component\HttpFoundation\Request $request
160   *   HTTP Request.
161   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
162   *   Display builder instance.
163   *
164   * @return array
165   *   A renderable array
166   */
167  public function restore(Request $request, InstanceInterface $display_builder_instance): array;
168
169  /**
170   * Revert entity override to default display.
171   *
172   * @param \Symfony\Component\HttpFoundation\Request $request
173   *   HTTP Request.
174   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
175   *   Display builder instance.
176   *
177   * @return array
178   *   A renderable array
179   */
180  public function revert(Request $request, InstanceInterface $display_builder_instance): array;
181
182  /**
183   * Move history to the last past state.
184   *
185   * @param \Symfony\Component\HttpFoundation\Request $request
186   *   HTTP Request.
187   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
188   *   Display builder instance.
189   *
190   * @return array
191   *   A renderable array
192   */
193  public function undo(Request $request, InstanceInterface $display_builder_instance): array;
194
195  /**
196   * Move history to the first future state.
197   *
198   * @param \Symfony\Component\HttpFoundation\Request $request
199   *   HTTP Request.
200   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
201   *   Display builder instance.
202   *
203   * @return array
204   *   A renderable array
205   */
206  public function redo(Request $request, InstanceInterface $display_builder_instance): array;
207
208  /**
209   * Clear history.
210   *
211   * @param \Symfony\Component\HttpFoundation\Request $request
212   *   HTTP Request.
213   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
214   *   Display builder instance.
215   *
216   * @return array
217   *   A renderable array
218   */
219  public function clear(Request $request, InstanceInterface $display_builder_instance): array;
220
221}

Paths

Below are the source code lines that represent each code path as identified by Xdebug. Please note a path is not necessarily coterminous with a line, a line may contain multiple paths and therefore show up more than once. Please also be aware that some paths may include implicit rather than explicit branches, e.g. an if statement always has an else as part of its logical flow even if you didn't write one.