function LocalActionDefault::create

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

Overrides ContainerFactoryPluginInterface::create

3 methods override LocalActionDefault::create()
BlockContentAddLocalAction::create in core/modules/block_content/src/Plugin/Menu/LocalAction/BlockContentAddLocalAction.php
Creates an instance of the plugin.
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.