PHP Class for generating Font Awesome icons.

v1.2.2 2020-12-19 16:53 UTC

This package is auto-updated.

Last update: 2024-10-20 00:58:33 UTC


README

PHP Class for generating Font Awesome icons. (now using v4.3.0!)

How to use

First use the namespace:

use Del\Icon;

Make sure you are using FontAwesome. Stick this in your <head> section:

<?= Icon::fontAwesomeHeadCssLink(); ?>

Or you can pass in the version number

<?= Icon::fontAwesomeHeadCssLink('4.7.1'); ?>

That will generate the CSS tag:
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">

Simplest use

<?= Icon::UNIVERSITY ;?>

Adding extra classes

<?= Icon::custom(Icon::UNIVERSITY,'fa-5x'); ?>

Adding extra classes, and a space( ) following it

<?= Icon::custom(Icon::UNIVERSITY,'fa-5x',true); ?>