function RouteDetailMenuLink::getOptions
Same name in other branches
- 4.x src/Plugin/Menu/RouteDetailMenuLink.php \Drupal\devel\Plugin\Menu\RouteDetailMenuLink::getOptions()
- 5.x src/Plugin/Menu/RouteDetailMenuLink.php \Drupal\devel\Plugin\Menu\RouteDetailMenuLink::getOptions()
File
-
src/
Plugin/ Menu/ RouteDetailMenuLink.php, line 16
Class
- RouteDetailMenuLink
- Modifies the menu link to add current route path.
Namespace
Drupal\devel\Plugin\MenuCode
public function getOptions() {
$options = parent::getOptions();
$options['query']['path'] = '/' . Url::fromRoute('<current>')->getInternalPath();
return $options;
}