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 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Drupal\display_builder\Island; |
| 6 | |
| 7 | use Drupal\display_builder\InstanceInterface; |
| 8 | |
| 9 | /** |
| 10 | * Interface for Island event subscriber. |
| 11 | */ |
| 12 | interface IslandEventSubscriberInterface { |
| 13 | |
| 14 | /** |
| 15 | * Event triggered when a node becomes active. |
| 16 | * |
| 17 | * @param \Drupal\display_builder\InstanceInterface $instance |
| 18 | * The Display Builder instance ID. |
| 19 | * @param array $data |
| 20 | * The node data. |
| 21 | * |
| 22 | * @return array |
| 23 | * Returns a render array with out-of-band commands. |
| 24 | */ |
| 25 | public function onActive(InstanceInterface $instance, array $data): array; |
| 26 | |
| 27 | /** |
| 28 | * Event triggered when a node is attached to the root. |
| 29 | * |
| 30 | * @param \Drupal\display_builder\InstanceInterface $instance |
| 31 | * The Display Builder instance ID. |
| 32 | * @param string $node_id |
| 33 | * The tree node ID. |
| 34 | * |
| 35 | * @return array |
| 36 | * Returns a render array with out-of-band commands. |
| 37 | */ |
| 38 | public function onAttachToRoot(InstanceInterface $instance, string $node_id): array; |
| 39 | |
| 40 | /** |
| 41 | * Event triggered when a node is attached to a slot. |
| 42 | * |
| 43 | * @param \Drupal\display_builder\InstanceInterface $instance |
| 44 | * The Display Builder instance ID. |
| 45 | * @param string $node_id |
| 46 | * The tree node ID. |
| 47 | * @param string $parent_id |
| 48 | * The parent node instance ID. |
| 49 | * |
| 50 | * @return array |
| 51 | * Returns a render array with out-of-band commands. |
| 52 | */ |
| 53 | public function onAttachToSlot(InstanceInterface $instance, string $node_id, string $parent_id): array; |
| 54 | |
| 55 | /** |
| 56 | * Event triggered when a node is deleted. |
| 57 | * |
| 58 | * @param \Drupal\display_builder\InstanceInterface $instance |
| 59 | * The Display Builder instance ID. |
| 60 | * @param string|null $parent_id |
| 61 | * The parent node ID, or NULL if the deleted node was at root. |
| 62 | * |
| 63 | * @return array |
| 64 | * Returns a render array with out-of-band commands. |
| 65 | */ |
| 66 | public function onDelete(InstanceInterface $instance, ?string $parent_id): array; |
| 67 | |
| 68 | /** |
| 69 | * Event triggered when the history changes. |
| 70 | * |
| 71 | * @param \Drupal\display_builder\InstanceInterface $instance |
| 72 | * The Display Builder instance ID. |
| 73 | * |
| 74 | * @return array |
| 75 | * Returns a render array with out-of-band commands. |
| 76 | */ |
| 77 | public function onHistoryChange(InstanceInterface $instance): array; |
| 78 | |
| 79 | /** |
| 80 | * Event triggered when the builder state is restored to its last saved state. |
| 81 | * |
| 82 | * @param \Drupal\display_builder\InstanceInterface $instance |
| 83 | * The Display Builder instance. |
| 84 | * |
| 85 | * @return array |
| 86 | * Returns a render array with out-of-band commands. |
| 87 | */ |
| 88 | public function onRestore(InstanceInterface $instance): array; |
| 89 | |
| 90 | /** |
| 91 | * Event triggered when an override is reverted to its default state. |
| 92 | * |
| 93 | * @param \Drupal\display_builder\InstanceInterface $instance |
| 94 | * The Display Builder instance. |
| 95 | * |
| 96 | * @return array |
| 97 | * Returns a render array with out-of-band commands. |
| 98 | */ |
| 99 | public function onRevert(InstanceInterface $instance): array; |
| 100 | |
| 101 | /** |
| 102 | * Event triggered when a node is moved. |
| 103 | * |
| 104 | * @param \Drupal\display_builder\InstanceInterface $instance |
| 105 | * The Display Builder instance ID. |
| 106 | * @param string $node_id |
| 107 | * The tree node ID. |
| 108 | * |
| 109 | * @return array |
| 110 | * Returns a render array with out-of-band commands. |
| 111 | */ |
| 112 | public function onMove(InstanceInterface $instance, string $node_id): array; |
| 113 | |
| 114 | /** |
| 115 | * Event triggered when a node is updated. |
| 116 | * |
| 117 | * @param \Drupal\display_builder\InstanceInterface $instance |
| 118 | * The Display Builder instance ID. |
| 119 | * @param string $node_id |
| 120 | * The tree node ID. |
| 121 | * |
| 122 | * @return array |
| 123 | * Returns a render array with out-of-band commands. |
| 124 | */ |
| 125 | public function onUpdate(InstanceInterface $instance, string $node_id): array; |
| 126 | |
| 127 | /** |
| 128 | * Event triggered when a builder is published. |
| 129 | * |
| 130 | * @param \Drupal\display_builder\InstanceInterface $instance |
| 131 | * The Display Builder instance ID. |
| 132 | * |
| 133 | * @return array |
| 134 | * Returns a render array with out-of-band commands. |
| 135 | */ |
| 136 | public function onPublish(InstanceInterface $instance): array; |
| 137 | |
| 138 | /** |
| 139 | * Event triggered when a preset is saved. |
| 140 | * |
| 141 | * @param \Drupal\display_builder\InstanceInterface $instance |
| 142 | * The Display Builder instance ID. |
| 143 | * |
| 144 | * @return array |
| 145 | * Returns a render array with out-of-band commands. |
| 146 | */ |
| 147 | public function onPresetSave(InstanceInterface $instance): array; |
| 148 | |
| 149 | } |
Below are the source code lines that represent each code branch as identified by Xdebug. Please note a branch is not
necessarily coterminous with a line, a line may contain multiple branches and therefore show up more than once.
Please also be aware that some branches may be implicit rather than explicit, e.g. an if statement
always has an else as part of its logical flow even if you didn't write one.