function RouteDetailMenuLink::getOptions

Same name in other branches
  1. 4.x src/Plugin/Menu/RouteDetailMenuLink.php \Drupal\devel\Plugin\Menu\RouteDetailMenuLink::getOptions()
  2. 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\Menu

Code

public function getOptions() {
    $options = parent::getOptions();
    $options['query']['path'] = '/' . Url::fromRoute('<current>')->getInternalPath();
    return $options;
}