定制 wfcreations/yii2-simple-line-icons 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wfcreations/yii2-simple-line-icons

Composer 安装命令:

composer require wfcreations/yii2-simple-line-icons

包简介

README 文档

README

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

For license information check the LICENSE-file.

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

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

to the require section of your composer.json file.

Usage

In view

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

or as dependency in your main application asset bundle

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);

统计信息

  • 总下载量: 5.76k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: BSD
  • 更新时间: 2015-06-30