2017 © Pedro Peláez
 

yii2-extension yii2-fontawesome

Font Awesome Asset Bundle for Yii2 framework

image

yidas/yii2-fontawesome

Font Awesome Asset Bundle for Yii2 framework

  • Monday, January 29, 2018
  • by yidas
  • Repository
  • 1 Watchers
  • 3 Stars
  • 1,059 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 58 % Grown

The README.md

, (*1)

Font Awesome Extension for Yii 2


Font Awesome Asset Bundle for Yii2 framework, (*2)

Latest Stable Version License Total Downloads Monthly Downloads, (*3)

This is the Font Awesome extension for Yii framework 2.0. It encapsulates Font Awesome distribution assets and thus makes using Font Awesome in Yii applications extremely easy., (*4)


INSTALLATION

The preferred install way is through Composer:, (*5)

composer require yidas/yii2-fontawesome

Or you could edit composer.json with adding package in require section then run composer update., (*6)

"yidas/yii2-fontawesome": "~2.0.0"

CONFIGURATION

Register or depend Asset into your application:, (*7)

yidas\yii\fontawesome\FontawesomeAsset

For eaxmple, to register Font Awesome assets in view :, (*8)

\yidas\yii\fontawesome\FontawesomeAsset::register($this);

Or as dependency in your app asset bundle :, (*9)

namespace app\assets;
use yii\web\AssetBundle;
class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [
        'css/site.css',
    ];
    public $js = [
    ];
    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
        'yidas\yii\fontawesome\FontawesomeAsset',
    ];
}

CDN Asset Mode

You could switch Asset to use CDN distribution by configuring config file:, (*10)

'components' => [
    'assetManager' => [
        'bundles' => [
            'yidas\yii\fontawesome\FontawesomeAsset' => [
                'cdn' => true,
                // 'cdnVersion' => '5.11.0',
            ],
        ],
    ],
],

Specify a CDN source

You could also specify CDN source you like:, (*11)

'assetManager' => [
    'bundles' => [
        'yidas\yii\fontawesome\FontawesomeAsset' => [
            'cdn' => true,
            'cdnCSS' => ['//maxcdn.bootstrapcdn.com/font-awesome/5.11.0/css/font-awesome.min.css'],
        ],
    ],
],

USAGE

Version Control

Update dependent packages

composer update yidas/yii2-fontawesome

Update newest Font-Awesome version

composer update fortawesome/font-awesome

Specify a Font-Awesome version

composer require fortawesome/font-awesome 5.11.0

The Versions

29/01 2018

dev-master

9999999-dev

Font Awesome Asset Bundle for Yii2 framework

  Sources   Download

MIT

The Requires

 

yii asset asset bundle font awesome

09/09 2017

2.0.0

2.0.0.0

Font Awesome Asset Bundle for Yii2 framework

  Sources   Download

MIT

The Requires

 

yii asset asset bundle font awesome