Improve extendability of SearchController and SearchActionFactory classes

Created on 12 August 2024, 3 months ago

Problem/Motivation

In our usecase it was necessary to extend the SearchAction, SearchActionFactory and SearchController classes.
Some improvements are required for the following problems:

  • SearchActionFactory class variables have private visibility
  • SearchActionFactory does not have an interface
  • The $searchAction variable would be useful as a class property in the SearchController, this way we can use data from it in extended methods that don't have it as an argument (getSearchHeader() for example)

Proposed resolution

  • Within SearchActionFactory, change the visibility of $size, $termStorage and getHierarchicalValues() to protected instead of private
  • Implement a SearchActionFactoryInterface and replace type hints
  • Add a $searchAction class property to the SearchController
📌 Task
Status

Needs review

Version

2.0

Component

Code

Created by

🇧🇪Belgium Joris Handstanger

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024