Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SystemMenuBlock.php

function SystemMenuBlock::create

Same name in this branch
  1. 11.1.x core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php \Drupal\system\Plugin\Derivative\SystemMenuBlock::create()

Overrides ContainerFactoryPluginInterface::create

1 method overrides SystemMenuBlock::create()
NavigationMenuBlock::create in core/modules/navigation/src/Plugin/Block/NavigationMenuBlock.php
Creates an instance of the plugin.

File

core/modules/system/src/Plugin/Block/SystemMenuBlock.php, line 69

Class

SystemMenuBlock
Provides a generic Menu block.

Namespace

Drupal\system\Plugin\Block

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal