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

New get_icon() function #2405

Open
1 of 4 tasks
FrederickChan opened this issue Sep 11, 2022 · 1 comment
Open
1 of 4 tasks

New get_icon() function #2405

FrederickChan opened this issue Sep 11, 2022 · 1 comment
Assignees
Labels
Roadmap Tracking Development Planning Use Only

Comments

@FrederickChan
Copy link
Member

FrederickChan commented Sep 11, 2022

With the good amount of icons being made available everyday, it is tough to keep everything up to date. And since implementations of each library is depending on personal taste or preferences, files are being edited all over to change to these icons.

In PHPFusion, we have commonly used icons such as caret, angle, ellipsis, search, filter, etc.

Hence, a new get_icon() function to replace this is very much feasible.

For example of this implementation is:

echo get_icon('search').' '.$locale['search']

The get_icon() can be 'fad fa-search', 'fa fa-search' 'lnr-search', 'bx bx-search' depending on what the final user requires.

The implementation will be as follows:

  • ImageRepo to add 2 additional function - setIcon and getIcon.
  • Under Each Font Icon Library, we add a new php file with a predefined array key to values.
  • Under Each Theme, we can also add a predefined array of icons.
  • Add get_icon function to be able to be used in Twig templates.

If the theme has a rule defined, that will be the displayed icon. Otherwise, the system rule will be used.

For user, they only have choices to use which "Set of icons"
Font Awesome 4, Font Awesome 5, Font Awesome 6, Linearcons, Entypo, MoonIco etc etc.

For now it will be good enough.

@FrederickChan FrederickChan self-assigned this Sep 11, 2022
@FrederickChan FrederickChan added this to the PHPFusion 9.03.00 milestone Sep 11, 2022
@FrederickChan FrederickChan added the Roadmap Tracking Development Planning Use Only label Sep 11, 2022
@FrederickChan
Copy link
Member Author

PHPFusion/docs@7de72fc

FrederickChan added a commit that referenced this issue Sep 11, 2022
Signed-off-by: deviance <meangczac.chan@gmail.com>
FrederickChan added a commit that referenced this issue Oct 5, 2022
Signed-off-by: deviance <meangczac.chan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Roadmap Tracking Development Planning Use Only
Projects
Status: Submitted
Development

No branches or pull requests

1 participant