Problem/Motivation
As part of #2924538: [META] Remove all usages of drupal_set_message and drupal_get_messages it would totally make sense to add a method to both ControllerBase and FormBase given that these are the places which should have this service conceptually.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 2937945-11-interdiff.txt | 808 bytes | kim.pepper |
| #11 | 2937945-11.patch | 3.22 KB | kim.pepper |
| #8 | base_system-add_messenger-2937945-8-D8.patch | 2.41 KB | ioana apetri |
Comments
Comment #2
ioana apetri commentedComment #3
ioana apetri commentedHere is my patch covered the messenger service into both classes.
Please review it.Thanks:)
Comment #4
volegerWhy not use MessengerTrait that mentioned in #2924538: [META] Remove all usages of drupal_set_message and drupal_get_messages?
It would be better for DX.
Comment #5
ioana apetri commentedHere is my changes(using the trait)
Comment #7
kim.pepperYou will need to copy the Trait code over as well, as it doesn't exist in head.
Comment #8
ioana apetri commentedI thought that should not be included. Sorry for the mistake.Heere is the new patch. thanks:)
Comment #9
kim.pepperThanks yo30. LGTM.
Comment #10
larowlanShould we be adding a single usage here so we get some implied test coverage?
Comment #11
kim.pepperI converted \Drupal\aggregator\Controller\AggregatorController to use it.
Comment #12
jibran#10 is addressed so back to RTBC.
Comment #13
kim.pepperTagging
Comment #16
catchCommitted/pushed to 8.6.x and cherry-picked to 8.5.x. Thanks!