- Issue created by @acbramley
Calling an exit
almost anywhere in a Drupal module is a bit of a no-no. We don't need this code to live in a field formatter in order to redirect the user to a different URL. An exit stops many other things occuring such as proper teardowns, anything using the DestructableInterface, and I imagine results in some of the other bugs in the queue.
Why not move to something a bit safer, such as a request subscriber similar to redirect module?
That's just one example, but all that really needs to happen is to grab the entity from the request, check it's using the formatter and then perform the redirect.
Thoughts?
Active
2.0
Code