- Issue created by @marcoliver
- 🇩🇪Germany manuelbitmade
@marcoliver Looks great, I have one suggestion though: I think it might be good to have the logic of actually getting the current version in some kind of manager class instead of it being directly inside the hook_toolbar hook. I would imagine this would be preferable if someone wants to for example display the version somewhere else. While at it we could also add an "alter" hook so the version string can be altered. This is optional but might be a lifesaver for situations where you don't have complete control over the version set in the environment.
That said it would be a perfect next release with the current implementation!
- 🇩🇪Germany marcoliver Neuss, NRW, Germany
Hi Manuel,
thanks for the input! I created a small service class that now contains the whole business of finding the configured service and at the end simply returns the appropriate version string. So now the toolbar hook only calls the getVersion() function on that service.
I think the alter hook could be handled in a separate issue.
Feel free to let me know if the new service is okay for you and I'll go ahead and create a new release.
- Assigned to manuelbitmade