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 the config form builder. |
9 | */ |
10 | interface ConfigFormBuilderInterface { |
11 | |
12 | // Storage property for the profile config entity ID. |
13 | // This will we used in some schema.yml, careful if you change it. |
14 | public const PROFILE_PROPERTY = 'profile'; |
15 | |
16 | // Storage property for the nestable list of UI Patterns 2 sources. |
17 | // This will we used in some schema.yml, careful if you change it. |
18 | public const SOURCES_PROPERTY = 'sources'; |
19 | |
20 | // Storage property for the overridden profile config entity ID. |
21 | // This will we used in some schema.yml, careful if you change it. |
22 | public const OVERRIDE_PROFILE_PROPERTY = 'override_profile'; |
23 | |
24 | // Storage property for of the override field. |
25 | // This will we used in some schema.yml, careful if you change it. |
26 | public const OVERRIDE_FIELD_PROPERTY = 'override_field'; |
27 | |
28 | /** |
29 | * Build form for integration with Display Builder. |
30 | * |
31 | * @param \Drupal\display_builder\DisplayBuildableInterface $entity |
32 | * An entity allowing the use of Display Builder. |
33 | * @param bool $mandatory |
34 | * (Optional). Is it mandatory to use Display Builder? (for example, in |
35 | * Page Layouts or in Entity View display Overrides). If not mandatory, |
36 | * the Display Builder is activated only if a Display Builder config entity |
37 | * is selected. |
38 | * |
39 | * @return array |
40 | * A form renderable array. |
41 | */ |
42 | public function build(DisplayBuildableInterface $entity, bool $mandatory = TRUE): array; |
43 | |
44 | /** |
45 | * Get profiles allowed for the current user. |
46 | * |
47 | * @return array |
48 | * The list of allowed profiles. |
49 | */ |
50 | public function getAllowedProfiles(): array; |
51 | |
52 | } |