icon-picker
icon-picker copied to clipboard
Wrong event in Icon Set documentation
Describe the bug
Trying to add my own set of icon set from the this example. The EVENT_REGISTER_INTEGRATIONS
is missing in the IconSets.php
file and results in an error:
Undefined constant verbb\iconpicker\services\IconSets::EVENT_REGISTER_INTEGRATIONS
Have tried the other events, but i get errors.
Is this removed by mistake or is the setup for this changed?
The namespacing in the example confuses me a bit too. I'm extending an existing module i have made, maybe thats wrong?
My end goal is to add the Iconify library, if that is to be added natively that would be great :)
Steps to reproduce
- Install the plugin, activate it
- add
iconifyIconSet.php
inmodules/icons
folder that extendsIconSet
- Register the
IconSets::EVENT_REGISTER_INTEGRATIONS
in theattachEventHandlers
i made withcraft modules
.
Craft CMS version
4.5.9
Plugin version
2.0.15
Multi-site?
No
Additional context
No response
That's what I get for copy-pasting! That should be EVENT_REGISTER_ICON_SETS
and just updated the docs.
As for the namespace, that's also fixed, hopefully that's clearer now.
hehe, all good, we have all been there! Got it working with the new event, i just forgot to update the namespace with the folder the file was added in. Would Iconify be a good native addition to the plugin? 😇
PS: the docs still have the EVENT_REGISTER_INTEGRATIONS
event 😝
Probably not a bad idea to have native support! A PR would always be welcome, or we can add it to the todo list.