ux icon indicating copy to clipboard operation
ux copied to clipboard

[Icons] Add a way to access icons via PHP code

Open gubler opened this issue 1 year ago • 2 comments

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.

gubler avatar Mar 25 '24 16:03 gubler

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).

kbond avatar Mar 27 '24 16:03 kbond

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.

smnandre avatar Mar 27 '24 19:03 smnandre