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   * Rebuild a single island which was deferred while it was off screen.
62   *
63   * Panels hidden behind an inactive tab or a closed sidebar drawer are
64   * skipped by the event fan-out, so they go stale. The client calls this when
65   * the user brings one back into view.
66   *
67   * @param \Symfony\Component\HttpFoundation\Request $request
68   *   HTTP Request.
69   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
70   *   Display builder instance.
71   * @param string $island_id
72   *   The island plugin ID to rebuild.
73   *
74   * @return array
75   *   A renderable array carrying the island's out-of-band swap.
76   *
77   * @see \Drupal\display_builder\Event\DisplayBuilderEventsSubscriber::shouldDefer()
78   */
79  public function reloadIsland(Request $request, InstanceInterface $display_builder_instance, string $island_id): array;
80
81  /**
82   * Update source.
83   *
84   * @param \Symfony\Component\HttpFoundation\Request $request
85   *   HTTP Request.
86   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
87   *   Display builder instance.
88   * @param string $node_id
89   *   Node ID of the source.
90   *
91   * @return array
92   *   A renderable array
93   */
94  public function update(Request $request, InstanceInterface $display_builder_instance, string $node_id): array;
95
96  /**
97   * Update source's 3rd party settings.
98   *
99   * @param \Symfony\Component\HttpFoundation\Request $request
100   *   HTTP Request.
101   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
102   *   Display builder instance.
103   * @param string $node_id
104   *   Node ID of the source.
105   * @param string $island_id
106   *   Island ID.
107   *
108   * @return array
109   *   A renderable array
110   */
111  public function thirdPartySettingsUpdate(Request $request, InstanceInterface $display_builder_instance, string $node_id, string $island_id): array;
112
113  /**
114   * Move history to the last past state.
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   *
121   * @return array
122   *   A renderable array
123   */
124  public function undo(Request $request, InstanceInterface $display_builder_instance): array;
125
126  /**
127   * Move history to the first future state.
128   *
129   * @param \Symfony\Component\HttpFoundation\Request $request
130   *   HTTP Request.
131   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
132   *   Display builder instance.
133   *
134   * @return array
135   *   A renderable array
136   */
137  public function redo(Request $request, InstanceInterface $display_builder_instance): array;
138
139  /**
140   * Clear history.
141   *
142   * @param \Symfony\Component\HttpFoundation\Request $request
143   *   HTTP Request.
144   * @param \Drupal\display_builder\InstanceInterface $display_builder_instance
145   *   Display builder instance.
146   *
147   * @return array
148   *   A renderable array
149   */
150  public function clear(Request $request, InstanceInterface $display_builder_instance): array;
151
152}

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.