- πΊπΈUnited States bluegeek9
I do not know of a graceful way to have this work as expected without making the authorization module a dependency. What is the down side to have this dependency?
- πΊπΈUnited States bluegeek9
We'll need to pass the container as a dependency. Use ModuleHandler to check for the authorization module, and container to load the dependency.
- Merge request !64Issue #2994481 by szato, bluegeek9: Remove static calls to authorization.manager β (Merged) created by bluegeek9
- Status changed to Needs review
over 1 year ago 1:35pm 21 December 2023 -
bluegeek9 β
committed 722b1385 on 8.x-4.x
Issue #2994481 by bluegeek9, szato: Remove static calls to authorization...
-
bluegeek9 β
committed 722b1385 on 8.x-4.x
- Status changed to Fixed
over 1 year ago 5:55pm 21 December 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Active
about 1 year ago 7:04pm 19 January 2024 - πΊπΈUnited States bluegeek9
I don't like how I fixed this. I want to inject the service, but allow for it to be null.
'@?authorization.manager'
Here is how Message Subscribe handled something similair:
services: message_subscribe.subscribers: class: \Drupal\message_subscribe\Subscribers arguments: ['@flag', '@config.factory', '@entity_type.manager', '@message_notify.sender', '@module_handler', '@queue'] calls: - [setMembershipManager, ['@?og.membership_manager']] - [setLoggerChannel, ['@logger.channel.message_subscribe']]
-
bluegeek9 β
committed 2bfcebca on 8.x-4.x
Issue #2994481 by bluegeek9, szato: Remove static calls to authorization...
-
bluegeek9 β
committed 2bfcebca on 8.x-4.x
- Status changed to Fixed
about 1 year ago 3:16pm 24 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.