public function InaccessibleMenuLink::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Menu/InaccessibleMenuLink.php \Drupal\Core\Menu\InaccessibleMenuLink::__construct()
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\MenuCode
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);
}