Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to configure icon prefix #220

Merged
merged 1 commit into from
Apr 27, 2014

Conversation

llwt
Copy link
Contributor

@llwt llwt commented Apr 26, 2014

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?

@nonlux
Copy link
Contributor

nonlux commented Apr 26, 2014

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"

@llwt
Copy link
Contributor Author

llwt commented Apr 26, 2014

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.

@nonlux
Copy link
Contributor

nonlux commented Apr 26, 2014

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.

@florianeckerstorfer
Copy link
Member

Thanks for the PR, I will merge it, but could you set the KnpMenu dependencies back to @alpha?

@llwt
Copy link
Contributor Author

llwt commented Apr 27, 2014

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?

@nonlux
Copy link
Contributor

nonlux commented Apr 27, 2014

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, 2014
add option to configure icon prefix
@florianeckerstorfer florianeckerstorfer merged commit 323f009 into braincrafted:develop Apr 27, 2014
@sandello-alkr
Copy link
Contributor

Does it solve #160 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants