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

subhojit777 created an issue. See original summary.

subhojit777’s picture

subhojit777’s picture

Issue summary: View changes

  • subhojit777 committed 50c8b45 on 8.x-1.x
    Issue #2919633 by subhojit777: [Code Improvement] Use container for...
  • subhojit777 committed 91d5673 on 8.x-1.x
    Issue #2919633 by subhojit777: [Code Improvement] Use container for...
  • subhojit777 committed cdbf851 on 8.x-1.x
    Issue #2919633 by subhojit777: [Code Improvement] Use container for...
  • subhojit777 committed f0aa7da on 8.x-1.x
    Issue #2919633 by subhojit777: [Code Improvement] Use container for...
subhojit777’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.