Implements dependency injection with entityTypeManager instead of MediaType::loadMultiple

Created on 23 June 2024, 5 months ago

Problem/Motivation

On formElement of EptSettingsDefaultWidget has MediaType::loadMultiple, which works fine, however it is possible to use dependency injection to enhance testability, flexibility, code organization, and maintainability.

Report from phpcs with best practices

-----------------------------------------------------------
MediaType::loadMultiple calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------

Proposed resolution

Add the class on statement
Include on construct
Update create method as well
Replace MediaType::loadMultiple
Ue $this->entityTypeManager

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.4

Component

Code

Created by

🇧🇷Brazil renatog Campinas

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