function NavigationMenuBlock::create

Same name in other branches
  1. 10 core/modules/navigation/src/Plugin/Block/NavigationMenuBlock.php \Drupal\navigation\Plugin\Block\NavigationMenuBlock::create()

Overrides SystemMenuBlock::create

File

core/modules/navigation/src/Plugin/Block/NavigationMenuBlock.php, line 34

Class

NavigationMenuBlock
Provides a generic menu navigation block.

Namespace

Drupal\navigation\Plugin\Block

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) : static {
    return new static($configuration, $plugin_id, $plugin_definition, $container->get('navigation.menu_tree'), $container->get('menu.active_trail'));
}

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