devmaks/yii2-glyphicons Yii2 glyphicons helper

bootstrapglyphiconglyphicons

Yii2 Glyphicons helper

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

The preferred way to install this extension is through composer.

Either run

composer require "devmaks/yii2-glyphicons:~1.0"

or add

devmaks/yii2-glyphicons": "~1.0",

to the require section of your composer.json file.

Helper examples


use devmaks\yii\glyphicons`;

//normal use
echo GI::Icon('home'); //<span class="glyphicon glyphicon-home" aria-hidden="true"></span>

or 

echo GI::Icon(GI::_HOME); //<span class="glyphicon glyphicon-home" aria-hidden="true"></span>

//shortcut
echo GI::I('apple'); //<span class="glyphicon glyphicon-apple" aria-hidden="true"></span>

or 

echo GI::I(GI::_APPLE); //<span class="glyphicon glyphicon-apple" aria-hidden="true"></span>

//use additional options
echo GI::Icon(GI::_ARROW_UP,['data-role' => 'arrow','class'=>'additional-class']);

//icon in button
echo Html::button(Yii::t('app','{icon} Save', ['icon' => GI::Icon(GI::_SAVE)]));

or

echo Html::button(GI::Icon(GI::_SAVE). ' Save');

//<button type="button">
//<span class="glyphicon glyphicon-save" aria-hidden="true"></span> Save
//</button>

//short open tag
<?= GI::Icon(GI::_GLOBE) ?>

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

  • 1.019 July 2016

Comments



1.0 is the latest of one release



MIT license
Stats
3 github stars & 0 github forks
0 downloads in the last day
3 downloads in the last 30 days
3 total downloads