MenuLinkAdd.php

Same filename in other branches
  1. 9 core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php
  2. 8.9.x core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php
  3. 10 core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php

Namespace

Drupal\menu_ui\Plugin\Menu\LocalAction

File

core/modules/menu_ui/src/Plugin/Menu/LocalAction/MenuLinkAdd.php

View source
<?php

namespace Drupal\menu_ui\Plugin\Menu\LocalAction;

use Drupal\Core\Menu\LocalActionWithDestination;
use Drupal\Core\Routing\RedirectDestinationInterface;
use Drupal\Core\Routing\RouteProviderInterface;

/**
 * Modifies the 'Add link' local action to add a destination.
 *
 * @deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Use
 *   \Drupal\Core\Menu\LocalActionWithDestination instead.
 *
 * @see https://www.drupal.org/node/3490245
 */
class MenuLinkAdd extends LocalActionWithDestination {
    public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteProviderInterface $route_provider, RedirectDestinationInterface $redirectDestination) {
        parent::__construct($configuration, $plugin_id, $plugin_definition, $route_provider, $redirectDestination);
        @trigger_error(__CLASS__ . ' is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Use \\Drupal\\Core\\Menu\\LocalActionWithDestination instead. See https://www.drupal.org/node/3490245', E_USER_DEPRECATED);
    }

}

Classes

Title Deprecated Summary
MenuLinkAdd

in drupal:11.2.0 and is removed from drupal:12.0.0. Use \Drupal\Core\Menu\LocalActionWithDestination instead.

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

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