public function RouteDetailMenuLink::getOptions in Devel 8.3
Same name and namespace in other branches
- 8 src/Plugin/Menu/RouteDetailMenuLink.php \Drupal\devel\Plugin\Menu\RouteDetailMenuLink::getOptions()
- 8.2 src/Plugin/Menu/RouteDetailMenuLink.php \Drupal\devel\Plugin\Menu\RouteDetailMenuLink::getOptions()
- 4.x src/Plugin/Menu/RouteDetailMenuLink.php \Drupal\devel\Plugin\Menu\RouteDetailMenuLink::getOptions()
Returns the options for this link.
Return value
array An associative array of options.
Overrides MenuLinkBase::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;
}