Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
0.00% |
0 / 2 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
||
| PageLayoutController | |
0.00% |
0 / 2 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
||
| getTitle | |
0.00% |
0 / 1 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 1 |
2 | |||||
| getBuilder | |
0.00% |
0 / 1 |
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_page_layout\Controller; |
| 6 | |
| 7 | use Drupal\Core\StringTranslation\TranslatableMarkup; |
| 8 | use Drupal\display_builder\Controller\IntegrationControllerBase; |
| 9 | use Drupal\display_builder_page_layout\PageLayoutInterface; |
| 10 | |
| 11 | /** |
| 12 | * Returns responses for Display Builder ui routes. |
| 13 | */ |
| 14 | class PageLayoutController extends IntegrationControllerBase { |
| 15 | |
| 16 | /** |
| 17 | * Returns a page title. |
| 18 | * |
| 19 | * @param \Drupal\display_builder_page_layout\PageLayoutInterface $page_layout |
| 20 | * The page layout entity. |
| 21 | * |
| 22 | * @return \Drupal\Core\StringTranslation\TranslatableMarkup |
| 23 | * The page title. |
| 24 | */ |
| 25 | public function getTitle(PageLayoutInterface $page_layout): TranslatableMarkup { |
| 26 | return $this->t('Build %label page layout', ['%label' => $page_layout->label()]); |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Load the display builder for page layout. |
| 31 | * |
| 32 | * @param \Drupal\display_builder_page_layout\PageLayoutInterface $page_layout |
| 33 | * The page layout entity. |
| 34 | * |
| 35 | * @return array |
| 36 | * The display builder renderable. |
| 37 | */ |
| 38 | public function getBuilder(PageLayoutInterface $page_layout): array { |
| 39 | return $this->renderBuilder($page_layout); |
| 40 | } |
| 41 | |
| 42 | } |
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.