function MenuLinkAdd::create

Same name in other branches
  1. 9 core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php \Drupal\menu_ui\Plugin\Menu\LocalAction\MenuLinkAdd::create()
  2. 8.9.x core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php \Drupal\menu_ui\Plugin\Menu\LocalAction\MenuLinkAdd::create()
  3. 11.x core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php \Drupal\menu_ui\Plugin\Menu\LocalAction\MenuLinkAdd::create()

Overrides LocalActionDefault::create

File

core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php, line 46

Class

MenuLinkAdd
Modifies the 'Add link' local action to add a destination.

Namespace

Drupal\menu_ui\Plugin\Menu\LocalAction

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'), $container->get('redirect.destination'));
}

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