Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
It would be nice to get a count of recipients as the categories
field on the mass contact form is updated.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#2 | patch-2869579-1.patch | 1.76 KB | manishsaharan |
|
Comments
Comment #2
manishsaharan CreditAttribution: manishsaharan commentedNow we can check number of users as per role or category during selecting each category
Comment #3
jhedstromThis is a great idea! Thanks for the initial patch.
A few comments regarding the implementation:
Nit pick: Trailing space here, and also this should mention what the callback does :)
Since there can be non-role-based 'grouping methods', this function will probably need to figure out which plugins are selected, and then call out to each selected plugin for a complete list of UIDs, and then do a count of unique uids returned by all methods.
Checkout
Drupal\mass_contact\Plugins\MassContact\GroupingMethod\Role
. We might need to add a new interface or something that defines the ability of a plugin to provide this ability.When this logic is moved into the role plugin, it should at the very least use
Database::select()
instead of a raw SQL query I think.Comment #4
jhedstrom