Problem/Motivation
It is a best practice to load services from the container. Read Lesson 8.3 - Dependency injection. Instead of statically loading services, use the container to load the services.
Proposed resolution
Change code in RefreshPageElementsHelper class. Load service from container.
Remaining tasks
Update kernel tests if necessary.
User interface changes
N/A
API changes
RefreshPageElementsHelper itself has to become a service. So we can no longer instantiate a new RefreshPageElementsHelper like this new RefreshPageElementsHelper(new AjaxResponse()). Instead RefreshPageElementsHelper has to be loaded from the container.
Data model changes
N/A
Comments
Comment #2
subhojit777Comment #3
subhojit777Comment #5
subhojit777