improvements-2.x-dev/modules/improvements_contact/src/Plugin/Menu/LocalTask/ContactFormMessagesLocalTask.php
modules/improvements_contact/src/Plugin/Menu/LocalTask/ContactFormMessagesLocalTask.php
<?php namespace Drupal\improvements_contact\Plugin\Menu\LocalTask; use Drupal\Core\Menu\LocalTaskDefault; use Drupal\Core\Routing\RouteMatchInterface; class ContactFormMessagesLocalTask extends LocalTaskDefault { /** * {@inheritDoc} */ public function getOptions(RouteMatchInterface $route_match): array { $options = parent::getOptions($route_match); $options['query']['form'] = \Drupal::routeMatch()->getRawParameter('contact_form'); return $options; } }