add option to configure icon prefix by llwt · Pull Request #220 · braincrafted/bootstrap-bundle
Conversation
I noticed that you hadn't added support for customizing the icon-set yet and I figured I'd take a crack at it since I needed to support FontAwesome for a project anyway.
It seemed to make the most sense to just allow configuration of the icon prefix rather than hardcoding library support.
@florianeckerstorfer Do you have any issues with this implementation or anything you want added/changed?
Good. But why use option for this?
May be use optional parameter for twig icon filter, it will be usefull, if you want to use several icon fonts in project?
Or detect icon font dynamic like this:
glyphicon-heart => generate classes "glyphicon glyphicon-heart"
fa-heart => generate classes "fa fa-heart"
someone-heart => generate classes "someone someone-heart"
heart => generate classes "glyphicon glyphicon-heart"
Good. But why use option for this?
In our particular use case the project is not using Glyphicons at all. Instead FontAwesome is used with the prefix set to "icon" instead of "fa". By adding that option to the configuration we only have to specify the prefix change once instead of every time a call is made to the "icon" helper.
Is `knplabs/knp-menu-bundle": "~2.0@dev", not to fail with bundle template. In last week I got a lot of errors for this.
Oh yeah, I had intended to comment on that, the @Alpha deps were failing to resolve. If it was just an error on my end I can revert those changes just let me know.
I understood about option. May be combine it with twig icon filter parameter? It be more usefull.
About knp-menu-bundle I test it today.
Thanks for the PR, I will merge it, but could you set the KnpMenu dependencies back to @Alpha?
Done, any idea why it would cause issues though?
Also, do you wan't me to update any of the docs with this?
Hm... for me:
"knplabs/knp-menu-bundle":"dev-master",
"knplabs/knp-paginator-bundle": "dev-master",
"knplabs/knp-menu": "dev-master",
Work fine. May be create test for this later?
florianeckerstorfer pushed a commit that referenced this pull request
Apr 27, 2014add option to configure icon prefix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters