Timeline for How can I redirect user, while showing them a status message?
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 7, 2021 at 18:43 | vote | accept | Kartagis | ||
Jan 1, 2021 at 18:57 | answer | added | 4uk4 | timeline score: 2 | |
Jan 1, 2021 at 16:09 | comment | added | Kartagis |
If you mean $redirect = new RedirectResponse($url);$redirect->send(); , it works for anonymous users, what's not working is using Messenger for them.
|
|
Jan 1, 2021 at 15:47 | comment | added | 4uk4 | Sending the redirect response. | |
Jan 1, 2021 at 15:24 | comment | added | Kartagis |
What is not possible? Showing a message to the anonymous user in hook_entity_view or something else?
|
|
Dec 31, 2020 at 14:44 | comment | added | 4uk4 | This is not possible. If you want to react on an entity displayed as main content you could check the route in a request event subscriber. | |
Dec 31, 2020 at 14:18 | comment | added | Kartagis |
That's not an option, as I need to use it in a hook_entity_view implementation.
|
|
Dec 30, 2020 at 16:13 | comment | added | 4uk4 | You can't send a response from custom code. Either return the response from a controller or set it in an event. | |
Dec 30, 2020 at 14:17 | history | asked | Kartagis | CC BY-SA 4.0 |