Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295445

The current user views default argument should use dependency injection

$
0
0

Problem/Motivation

User ID from logged in user default argument for views contextual filter, right now is getting from \Drupal::curentUser(); global class instead of dependency injection to get AccountProxy object of current user.

Proposed resolution

Add dependency injection to the Drupal\user\Plugin\views\argument_default\CurrentUser class
Also, fix phpDoc.


Viewing all articles
Browse latest Browse all 295445


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>