InaccessibleMenuLink::__construct

public InaccessibleMenuLink::__construct(MenuLinkInterface $wrapped_link)

Constructs a new InaccessibleMenuLink.

Parameters

\Drupal\Core\Menu\MenuLinkInterface $wrapped_link: The menu link to wrap.

Overrides PluginBase::__construct

File

core/lib/Drupal/Core/Menu/InaccessibleMenuLink.php, line 27

Class

InaccessibleMenuLink
A menu link plugin for wrapping another menu link, in sensitive situations.

Namespace

Drupal\Core\Menu

Code

public function __construct(MenuLinkInterface $wrapped_link) {
  $this->wrappedLink = $wrapped_link;
  $plugin_definition = [
    'route_name' => '<front>',
    'route_parameters' => [],
    'url' => NULL,
  ] + $this->wrappedLink->getPluginDefinition();
  parent::__construct([], $this->wrappedLink->getPluginId(), $plugin_definition);
}
doc_Drupal
2016-10-29 09:20:33
Comments
Leave a Comment

Please login to continue.