A service is needed to allow callers to modify, delete and insert global blocks stored in the globalblocks table. This service will move methods from the GlobalBlocking static utility class that are related to managing global blocks, and will also modify the methods to use dependency injection and other necessary fixes that perform no change to the functionality of the methods.
The methods being in a service also allows easier testing, as the existing methods are only partly tested and will allow mocking these methods for future tests of code that uses this service
Acceptance criteria
- Create the GlobalBlockManager service by using copies of the relevant methods from the GlobalBlocking static utility class
- Update the methods to use DI and SQL query builders
- Ensure good test coverage over the new service