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

Dependency injection in permission callbacks

$
0
0

Problem/Motivation

The permissions callback provider class, being handled by the controller resolver, is capable of dependency injection by implementing ContainerInjectionInterface. The following patch adds that for the node module permission provider. The same should be done for other core modules that provide permission callbacks.

Proposed resolution

Make NodePermissions implement ContainerInjectionInterface
Add autowiring of entity type manager

Remaining tasks

Review

API changes

NodePermissions now requires an $entityTypeManager argument.


Viewing all articles
Browse latest Browse all 295813

Trending Articles



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