You are here

public function RouteDetailMenuLink::getOptions in Devel 8

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

Code

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