Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| PageLayoutHook | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
| preprocessHtml | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Drupal\display_builder_page_layout\Hook; |
| 6 | |
| 7 | use Drupal\Core\Hook\Attribute\Hook; |
| 8 | |
| 9 | /** |
| 10 | * Hook implementations for the display_builder_page_layout module. |
| 11 | */ |
| 12 | class PageLayoutHook { |
| 13 | |
| 14 | /** |
| 15 | * Preprocess theme variables for HTML templates. |
| 16 | * |
| 17 | * @param array $variables |
| 18 | * The variables array (modify in place). |
| 19 | * |
| 20 | * @see \Drupal\display_builder_page_layout\Plugin\DisplayVariant\FullPageBuilderPageVariant |
| 21 | */ |
| 22 | #[Hook('preprocess_html')] |
| 23 | public function preprocessHtml(array &$variables): void { |
| 24 | if (($variables['page']['#page_variant'] ?? NULL) !== 'display_builder_full') { |
| 25 | return; |
| 26 | } |
| 27 | unset($variables['page']['content']['page_title']); |
| 28 | } |
| 29 | |
| 30 | } |