3 namespace Drupal\devel\Plugin\Menu;
5 use Drupal\Core\Menu\MenuLinkDefault;
9 * Modifies the menu link to add destination.
11 class DestinationMenuLink extends MenuLinkDefault {
16 public function getOptions() {
17 $options = parent::getOptions();
18 // Append the current path as destination to the query string.
19 $options['query']['destination'] = Url::fromRoute('<current>')->toString();
26 * @todo Make cacheable once https://www.drupal.org/node/2582797 lands.
28 public function getCacheMaxAge() {