Problem/Motivation
I created a comment word filter, and ran into a problem when I wanted to change the content of the "Unapproved comments" list under "Content > Comments".
It would be helpful if the content of this unapproved comment list could be altered by other modules.
Proposed resolution
A Drupal\comment\Event\CommentAdminOverviewQueryEvent::EVENT_COMMENT_QUERY event is dispatched before querying for comments.
The event contains the query.
Remaining tasks
- Check whether or not this changed is desired
- Review code
- Add test coverage
- Commit
User interface changes
None
API changes
None
Data model changes
None
Comments
Comment #2
orlando.thoenyI created a patch for the current 8.6.x dev branch and the 8.5.6 release.
Comment #3
markdorisonComment #8
nemanja commentedPatch for 9.2 core version
Comment #9
ankithashettyThe rerolled patch in #8 had a file missing (
+ b/core/modules/comment/src/Event/CommentAdminOverviewQueryEvent.php).Rerolled tha patch in #2 again and changed the deprecated class usage from
use Symfony\Component\EventDispatcher\Event;touse Drupal\Component\EventDispatcher\Event;.Thank you!