[Icons] Add a way to access icons via PHP code
It would be helpful to have a way to access icons from PHP code (for example, to send SVG data in a payload to be loaded by JS).
This could possibly be by loading the icon registry as a service and then fetching an icon (using the same identifier as I would use in the Twig ux-icon('icon-name') function.
I'd like to stabilize the API a bit before adding this but for sure, we should enable this. I'm thinking to make IconRegistryInterface auto-wireable (removing the @internal flag from it and Icon).
Agree with @kbond ! Yes to the idea, but let’s take some time before exposing anything, as the next week could require some changes in the implementation.