Use dependency injection when possible

Created on 15 May 2023, about 1 year ago
Updated 16 May 2023, about 1 year ago

Problem/Motivation

As per Drupal best practises. "\Drupal calls should be avoided in classes, use dependency injection instead"

Steps to reproduce

Proposed resolution

Use dependency injection for Drupal logger in `AdvancedLinkAttributesFieldFormatter.php and AdvancedLinkAttributesFieldWidget.php` file

Like these use dependency injection:
\Drupal::config('ala.settings')

\Drupal::currentUser();

\Drupal::token()

📌 Task
Status

Needs review

Version

2.3

Component

Code

Created by

🇮🇳India shashank5563 New Delhi

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

Comments & Activities

Production build 0.69.0 2024