2017 © Pedro Peláez
 

yii2-extension yii2-simple-line-icons

image

wfcreations/yii2-simple-line-icons

  • Friday, July 10, 2015
  • by wfcreations
  • Repository
  • 1 Watchers
  • 2 Stars
  • 1,059 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 11 % Grown

The README.md

Yii 2 Simple Line Icons Asset Bundle

This extension provides a assets bundle with Simple Line Icons for Yii framework 2.0 applications and helper to use icons., (*1)

For license information check the LICENSE-file., (*2)

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

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

composer require "wfcreations/yii2-simple-line-icons:*"

or add, (*6)

"wfcreations/yii2-simple-line-icons": "*",

to the require section of your composer.json file., (*7)

Usage

In view, (*8)

wfcreations\simplelineicons\AssetBundle::register($this);

or as dependency in your main application asset bundle, (*9)

class AppAsset extends AssetBundle
{
    // ...

    public $depends = [
        // ...
        '\wfcreations\simplelineicons\AssetBundle'
    ];
}

Helper

use wfcreations\simplelineicons\SLI;

echo SLI::icon('home'); // <i class="icon-home"></i>
echo SLI::icon(
    'home', 
    ['data-role' => 'home']
); // <i class="home" data-role="home"></i>

echo Html::submitButton(
    Yii::t('app', '{icon} Login', ['icon' => SLI::icon('login')])
); // <button type="submit"><i class="icon-login"></i> Login</button>

// autocomplete icons name in IDE
echo SLI::icon(SLI::_USER_FEMALE);
echo SLI::icon(SLI::_USER_FOLLOW);

The Versions

10/07 2015

dev-master

9999999-dev

  Sources   Download

BSD

The Requires

  • bower-asset/simple-line-icons *

 

by Avatar wfcreations