rmrevin/yii2-ionicon Asset Bundle for Yii2 with Ionicon

fontassetbundlesocialiconsionicon

Yii 2 Ionicon Asset Bundle

License Latest Stable Version Latest Unstable Version Total Downloads

Code Status

Scrutinizer Code Quality Code Coverage Travis CI Build Status Dependency Status

Installation

Either run

composer require "rmrevin/yii2-ionicon:~1.2"

or add in composer.json:

{
    "require": {
        "rmrevin/yii2-ionicon": "~1.2"
    }
}

Usage

In view

<?
// ...

rmrevin\yii\ionicon\AssetBundle::register($this);

or as dependency in your asset bundle

<?
// ...

class AppAsset extends AssetBundle
{
    // ...

    public $depends = [
        // ...
        '\rmrevin\yii\ionicon\AssetBundle'
    ];
}

Helper


use rmrevin\yii\ionicon\Ion;

echo Ion::icon('social-twitter');
// <i class="ion-social-twitter"></i>
echo Ion::icon('social-twitter', ['class' => 'big', 'data-role' => 'social-button']);
// <i class="big ion-social-twitter" data-role="social-button"></i>
echo Html::submitButton(Yii::t('app', '{check} Tweet', ['check' => Ion::icon('social-twitter')]));
// <button type="submit"><i class="ion-social-twitter"></i> Tweet</button>

// autocomplete in IDE
echo Ion::icon(Ion::_SOCIAL_TWITTER);
echo Ion::icon(Ion::_ANDROID_BULB);

Another prefix

Ion::$cssPrefix = 'ionicon';

echo Ion::icon('social-twitter');
// <i class="ionicon-social-twitter"></i>

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



1.2.0 is the latest of 4 releases



MIT license
Stats
7 github stars & 3 github forks
37 downloads in the last day
786 downloads in the last 30 days
59298 total downloads