function MenuLinkDefault::create

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Menu/MenuLinkDefault.php \Drupal\Core\Menu\MenuLinkDefault::create()
  2. 10 core/lib/Drupal/Core/Menu/MenuLinkDefault.php \Drupal\Core\Menu\MenuLinkDefault::create()
  3. 11.x core/lib/Drupal/Core/Menu/MenuLinkDefault.php \Drupal\Core\Menu\MenuLinkDefault::create()

Overrides ContainerFactoryPluginInterface::create

1 method overrides MenuLinkDefault::create()
LoginLogoutMenuLink::create in core/modules/user/src/Plugin/Menu/LoginLogoutMenuLink.php
Creates an instance of the plugin.

File

core/lib/Drupal/Core/Menu/MenuLinkDefault.php, line 52

Class

MenuLinkDefault
Provides a default implementation for menu link plugins.

Namespace

Drupal\Core\Menu

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.static.overrides'));
}

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