Initial Drupal 11 with DDEV setup

This commit is contained in:
gluebox
2025-10-08 11:39:17 -04:00
commit 89ef74b305
25344 changed files with 2599172 additions and 0 deletions

View File

@ -0,0 +1,25 @@
<?php
/**
* @file
*/
use Drupal\navigation\TopBarRegion;
/**
* Prepares variables for navigation top bar template.
*
* Default template: top-bar.html.twig
*
* @param array $variables
* An associative array containing:
* - element: An associative array containing the properties and children of
* the top bar.
*/
function template_preprocess_top_bar(&$variables): void {
$element = $variables['element'];
foreach (TopBarRegion::cases() as $region) {
$variables[$region->value] = $element[$region->value] ?? NULL;
}
}