Closed Toflar closed 6 years ago
Ping for review @aschempp
Should we tag for the current page ID (and possibly article) as well, as a change to them might affect the response? Or is this done in another place?
I assume the tagResponse
method can be called multiple times? I don't really like the name though, as it's not obvious we're tagging the final response and not the one generated by this controller…
Should we tag for the current page ID (and possibly article) as well, as a change to them might affect the response? Or is this done in another place?
This should be done in the respective places. The idea of tags is that you don't have to worry about in what context it is used. If someone else adds another tag to your response then that's just fine. So nothing to do here.
I assume the tagResponse method can be called multiple times?
Yes, that's why it's not called setTags()
or similar.
I don't really like the name though, as it's not obvious we're tagging the final response and not the one generated by this controller…
You're not. Tags are added to all master requests (so ESI as well) during the kernel.response
event. So not necessarily the "final response".
Thank you @Toflar.
Added support for automatically tagging the elements created using the new abstract controllers. That was still missing 😄