function MenuLinkAdd::__construct

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

Constructs a MenuLinkAdd object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Routing\RouteProviderInterface $route_provider: The route provider to load routes by name.

\Drupal\Core\Routing\RedirectDestinationInterface $redirect_destination: The redirect destination.

Overrides LocalActionDefault::__construct

File

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

Class

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

Namespace

Drupal\menu_ui\Plugin\Menu\LocalAction

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteProviderInterface $route_provider, RedirectDestinationInterface $redirect_destination) {
    parent::__construct($configuration, $plugin_id, $plugin_definition, $route_provider);
    $this->redirectDestination = $redirect_destination;
}

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