Move Search404Controller::search404GetKeys() to a service so other modules can use it

Created on 2 March 2023, about 2 years ago
Updated 31 October 2023, over 1 year ago

Problem/Motivation

A form on the 404 page needs to show the search terms from the URL used to generate search results. The method to get the search terms is part of Search404Controller, and therefore cannot be used in/by other parts of the system.

Proposed resolution

Move Search404Controller::search404GetKeys() to a service that can be called by other modules.

Remaining tasks

User interface changes

None.

API changes

Any module can now call the method with \Drupal::service('search404.service')->search404GetKeys() to retrieve the search terms.

Data model changes

None.

Feature request
Status

Postponed: needs info

Version

2.0

Component

Code

Created by

🇨🇦Canada jaypan Victoria, BC

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024