function LocalActionDefault::create

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

Overrides ContainerFactoryPluginInterface::create

2 methods override LocalActionDefault::create()
MenuLinkAdd::create in core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php
Creates an instance of the plugin.
TestLocalActionWithConfig::create in core/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalAction/TestLocalActionWithConfig.php
Creates an instance of the plugin.

File

core/lib/Drupal/Core/Menu/LocalActionDefault.php, line 50

Class

LocalActionDefault
Provides a default implementation for local action 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('router.route_provider'));
}

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