Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| DisplayBuilderUiHooks | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| entityTypeAlter | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Drupal\display_builder_ui\Hook; |
| 6 | |
| 7 | use Drupal\Core\Hook\Attribute\Hook; |
| 8 | |
| 9 | /** |
| 10 | * Hook implementations for display_builder_ui. |
| 11 | */ |
| 12 | class DisplayBuilderUiHooks { |
| 13 | |
| 14 | /** |
| 15 | * Alter the entity type definitions. |
| 16 | * |
| 17 | * @param \Drupal\Core\Entity\EntityTypeInterface[] $entity_types |
| 18 | * Entity types definitions. |
| 19 | */ |
| 20 | #[Hook('entity_type_alter')] |
| 21 | public function entityTypeAlter(array &$entity_types): void { |
| 22 | $entity_types['pattern_preset']->setLinkTemplate('edit-form', '/admin/structure/display-builder/preset/{pattern_preset}'); |
| 23 | } |
| 24 | |
| 25 | } |
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.
| 21 | public function entityTypeAlter(array &$entity_types): void { |
| 22 | $entity_types['pattern_preset']->setLinkTemplate('edit-form', '/admin/structure/display-builder/preset/{pattern_preset}'); |
| 23 | } |