05/02
2015
Wallogit.com
2017 © Pedro Peláez
PHP Class for generating Font Awesome icons.
PHP Class for generating Font Awesome icons. (now using v4.3.0!), (*1)
First use the namespace:
, (*2)
use Del\Icon;
Make sure you are using FontAwesome. Stick this in your <head> section:
, (*3)
<?= Icon::fontAwesomeHeadCssLink(); ?>
Or you can pass in the version number, (*4)
<?= 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">, (*5)
Simplest use, (*6)
<?= Icon::UNIVERSITY ;?>
Adding extra classes, (*7)
<?= Icon::custom(Icon::UNIVERSITY,'fa-5x'); ?>
Adding extra classes, and a space( ) following it, (*8)
<?= Icon::custom(Icon::UNIVERSITY,'fa-5x',true); ?>