function MenuLinkDefault::create
Instantiates a new instance of the implementing class using autowiring.
Return value
static
Overrides PluginBase::create
1 call to MenuLinkDefault::create()
- NavigationUserBlock::buildLinks in core/
modules/ navigation/ src/ Plugin/ Block/ NavigationUserBlock.php - Lazy builder callback.
1 method overrides MenuLinkDefault::create()
- LoginLogoutMenuLink::create in core/
modules/ user/ src/ Plugin/ Menu/ LoginLogoutMenuLink.php - Instantiates a new instance of the implementing class using autowiring.
File
-
core/
lib/ Drupal/ Core/ Menu/ MenuLinkDefault.php, line 53
Class
- MenuLinkDefault
- Provides a default implementation for menu link plugins.
Namespace
Drupal\Core\MenuCode
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.