function MenuLinkDefault::create

Same name in other branches
  1. 9 core/lib/Drupal/Core/Menu/MenuLinkDefault.php \Drupal\Core\Menu\MenuLinkDefault::create()
  2. 8.9.x core/lib/Drupal/Core/Menu/MenuLinkDefault.php \Drupal\Core\Menu\MenuLinkDefault::create()
  3. 10 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

File

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

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.