Problem/Motivation

Use of static:

  • \Drupal::time();
  • \Drupal::config();

Proposed resolution

Intejct the service datetime.time and use the method $this->config(); of ControllerBase

Comments

thalles created an issue. See original summary.

thalles’s picture

Status: Needs work » Needs review
StatusFileSize
new2.4 KB

Follow a patch with the injection.

gg24’s picture

Status: Needs review » Reviewed & tested by the community

Hi @thalles,

The above patch works for me. Hence moving it to RTBC.

Thanks!

wundo’s picture

wundo’s picture

wundo’s picture

  • wundo committed c589447 on 8.x-1.x
    Issue #3057586 by wundo, thalles, gg24: Dependency injection on...
wundo’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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