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 plugins with a builder related functionality. |
9 | */ |
10 | interface IslandBuilderInterface { |
11 | |
12 | /** |
13 | * Build renderable from state data. |
14 | * |
15 | * @param string $builder_id |
16 | * Builder ID. |
17 | * @param string $instance_id |
18 | * Instance ID. |
19 | * @param array $data |
20 | * The UI Patterns 2 form state data. |
21 | * @param int $index |
22 | * (Optional) The index of the block. Default to 0. |
23 | * |
24 | * @return array|null |
25 | * A renderable array. |
26 | */ |
27 | public function buildSingleComponent(string $builder_id, string $instance_id, array $data, int $index = 0): ?array; |
28 | |
29 | /** |
30 | * Build renderable from state data. |
31 | * |
32 | * @param string $builder_id |
33 | * Builder ID. |
34 | * @param string $instance_id |
35 | * Instance ID. |
36 | * @param array $data |
37 | * The UI Patterns 2 form state data. |
38 | * @param int $index |
39 | * (Optional) The index of the block. Default to 0. |
40 | * |
41 | * @return array|null |
42 | * A renderable array. |
43 | */ |
44 | public function buildSingleBlock(string $builder_id, string $instance_id, array $data, int $index = 0): ?array; |
45 | |
46 | } |