Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
PageLayoutController | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
getTitle | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getBuilder | |
0.00% |
0 / 1 |
|
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 | } |