-
- Notifications
You must be signed in to change notification settings - Fork 383
Open
Labels
IconsRFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)Stalled
Description
I'm using knp_dictionary to define icons by class:
$containerConfigurator->extension('knp_dictionary', [ 'dictionaries' => [ 'class_icons' => [ 'type' => 'key_value', 'content' => [ \App\Entity\Member::class => 'mdi:user', \App\Entity\DirectoryCollection::class => 'mdi:users', \App\Entity\Tag::class => 'mdi:tag', \App\Entity\Donation::class => 'mdi:dollar', \App\Entity\CommunicationLog::class => 'mdi:envelope', \App\Entity\Event::class => 'tabler:calendar' ] ],
These work as expected in dev, as the ux_icon renderer fetches the icon on demand. I'd like to import them to production during the lock
bin/console ux:icons:lock
Of course, it doesn't now. My idea for implementation is dispatching an event that I could listen for and add the icons based on how I store them. For example, I recently discovered https://github.com/zenstruck/class-metadata and considered putting my icons there instead, e.g.
#[Metadata('icon', 'mdi:user')] class User
In one project I have the icons as twig globals in twig.yaml.
In short, I'd like a way to register variable icons to make the discoverable during the lock command.
Metadata
Metadata
Assignees
Labels
IconsRFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)Stalled