We can use \Drupal::messenger()->addMessage instead of drupal_set_message
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | ad_entity_cleanly.png | 102.89 KB | guilhermevp |
| #2 | ad_entity-3101208-2.patch | 5.7 KB | pifagor |
We can use \Drupal::messenger()->addMessage instead of drupal_set_message
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | ad_entity_cleanly.png | 102.89 KB | guilhermevp |
| #2 | ad_entity-3101208-2.patch | 5.7 KB | pifagor |
Comments
Comment #2
pifagorComment #3
mxh commentedComment #4
guilhermevp commentedPatch applies cleanly and works as intended. However, I believe a better patch would remove \Drupal calls from classes with Dependency Injection.
RTBC.
Comment #7
mxh commented