Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
0.00% |
0 / 8 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
||
| EntityViewDisplayForm | |
0.00% |
0 / 8 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
||
| create | |
0.00% |
0 / 6 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 1 |
2 | |||||
| form | |
0.00% |
0 / 2 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 1 |
2 | |||||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Drupal\display_builder_entity_view\Form; |
| 6 | |
| 7 | use Drupal\Core\Form\FormStateInterface; |
| 8 | use Drupal\Core\Menu\LocalTaskManager; |
| 9 | use Drupal\Core\Routing\RouteBuilderInterface; |
| 10 | use Drupal\display_builder\ConfigFormBuilderInterface; |
| 11 | use Drupal\field_ui\Form\EntityViewDisplayEditForm; |
| 12 | use Symfony\Component\DependencyInjection\ContainerInterface; |
| 13 | |
| 14 | /** |
| 15 | * Edit form for the entity view display entity type. |
| 16 | * |
| 17 | * @internal |
| 18 | * Form classes are internal. |
| 19 | */ |
| 20 | final class EntityViewDisplayForm extends EntityViewDisplayEditForm { |
| 21 | |
| 22 | use EntityViewDisplayFormTrait; |
| 23 | |
| 24 | /** |
| 25 | * The config form builder for Display Builder. |
| 26 | */ |
| 27 | protected ConfigFormBuilderInterface $configFormBuilder; |
| 28 | |
| 29 | /** |
| 30 | * The local task manager. |
| 31 | */ |
| 32 | protected LocalTaskManager $localTaskManager; |
| 33 | |
| 34 | /** |
| 35 | * The router builder. |
| 36 | */ |
| 37 | protected RouteBuilderInterface $routeBuilder; |
| 38 | |
| 39 | /** |
| 40 | * The entity being used by this form. |
| 41 | * |
| 42 | * @var \Drupal\display_builder_entity_view\Entity\EntityViewDisplay |
| 43 | */ |
| 44 | protected $entity; |
| 45 | |
| 46 | /** |
| 47 | * {@inheritDoc} |
| 48 | */ |
| 49 | public static function create(ContainerInterface $container): static { |
| 50 | $instance = parent::create($container); |
| 51 | $instance->configFormBuilder = $container->get('display_builder.config_form_builder'); |
| 52 | $instance->entityTypeManager = $container->get('entity_type.manager'); |
| 53 | $instance->localTaskManager = $container->get('plugin.manager.menu.local_task'); |
| 54 | $instance->routeBuilder = $container->get('router.builder'); |
| 55 | |
| 56 | return $instance; |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * {@inheritdoc} |
| 61 | */ |
| 62 | public function form(array $form, FormStateInterface $form_state): array { |
| 63 | $form = parent::form($form, $form_state); |
| 64 | |
| 65 | return $this->entityViewDisplayForm($form); |
| 66 | } |
| 67 | |
| 68 | } |
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.