function TopBarItemManager::getRenderedTopBarItemsByRegion

File

core/modules/navigation/src/TopBarItemManager.php, line 36

Class

TopBarItemManager
Top bar item plugin manager.

Namespace

Drupal\navigation

Code

public function getRenderedTopBarItemsByRegion(TopBarRegion $region) : array {
    $instances = [];
    foreach ($this->getDefinitionsByRegion($region) as $plugin_id => $plugin_definition) {
        $instances[$plugin_id] = $this->createInstance($plugin_id)
            ->build();
    }
    return $instances;
}

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