function NavigationLayout::build

Overrides LayoutDefault::build

File

core/modules/navigation/src/NavigationLayout.php, line 20

Class

NavigationLayout
Defines a layout class for navigation.

Namespace

Drupal\navigation

Code

public function build(array $regions) {
    foreach (Element::children($regions) as $region_id) {
        foreach (Element::children($regions[$region_id]) as $component_uuid) {
            if (!Element::isEmpty($regions[$region_id][$component_uuid])) {
                $regions[$region_id][$component_uuid]['#theme'] = 'block__navigation';
            }
        }
    }
    return parent::build($regions);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.