Download the PHP package algsupport/yii2-fontawesome without Composer
On this page you can find all versions of the php package algsupport/yii2-fontawesome. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-fontawesome
Yii 2 Font Awesome Asset Bundle
This extension provides an assets bundle with Font Awesome for Yii framework 2.0 applications and helper to use icons.
For license information check the LICENSE-file.
Support
Fontawesome version
Version of font-awesome | Version of extension |
---|---|
6.* | ~4.0 |
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require
section of your composer.json
file.
Usage with fa pro version
CDN
Create a new kit here - https://fontawesome.com/kits
Add your kit in the assetManager
config under components
:
Add CdnProAssetBundle
as depends of your app asset bundle:
Or inject CdnProAssetBundle
in your view:
NPM
Install npm package of font:
or
And add NpmProAssetBundle
as depends of your app asset bundle:
Or inject NpmProAssetBundle
in your view:
Optional
In order for do not install the free version of the font-awesome package, you can add it to the replace
section of composer.json
.
Usage with fa free version
CDN
Add CdnFreeAssetBundle
as depends of your app asset bundle:
Or inject CdnFreeAssetBundle
in your view:
Composer
Free version of package fortawesome/font-awesome
already installed in vendor.
Add NpmFreeAssetBundle
as depends of your app asset bundle:
Or inject NpmFreeAssetBundle
in your view:
Class reference
Namespace: algsupport\yii\fontawesome
;
Class FAB
, FAL
, FAR
, FAS
or FontAwesome
static FAR::icon($name, $options=[])
- Creates ancomponent\Icon
that can be used to FontAwesome html icon$name
- name of icon in font awesome set.$options
- additional attributes fori.fa
html tag.
static FAR::stack($name, $options=[])
- Creates ancomponent\Stack
that can be used to FontAwesome html icon$options
- additional attributes forspan.fa-stack
html tag.
Class component\Icon
(string)$Icon
- render icon$Icon->addCssClass($value)
- add to html tag css class in$value
$value
- name of css class
$Icon->inverse()
- add to html tag css classfa-inverse
$Icon->spin()
- add to html tag css classfa-spin
$Icon->fixedWidth()
- add to html tag css classfa-fw
$Icon->ul()
- add to html tag css classfa-ul
$Icon->li()
- add to html tag css classfa-li
$Icon->border()
- add to html tag css classfa-border
$Icon->pullLeft()
- add to html tag css classpull-left
$Icon->pullRight()
- add to html tag css classpull-right
$Icon->size($value)
- add to html tag css class with size$value
- size value (variants:FA::SIZE_LARGE
,FA::SIZE_2X
,FA::SIZE_3X
,FA::SIZE_4X
,FA::SIZE_5X
)
$Icon->rotate($value)
- add to html tag css class with rotate$value
- rotate value (variants:FA::ROTATE_90
,FA::ROTATE_180
,FA::ROTATE_270
)
$Icon->flip($value)
- add to html tag css class with rotate$value
- flip value (variants:FA::FLIP_HORIZONTAL
,FA::FLIP_VERTICAL
)
Class component\Stack
(string)$Stack
- render icon stack$Stack->icon($icon, $options=[])
- set icon for stack$icon
- name of icon orcomponent\Icon
object$options
- additional attributes for icon html tag.
$Stack->icon($icon, $options=[])
- set background icon for stack$icon
- name of icon orcomponent\Icon
object$options
- additional attributes for icon html tag.