geoffry304/yii2-symbol-picker 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

geoffry304/yii2-symbol-picker

Composer 安装命令:

composer require geoffry304/yii2-symbol-picker

包简介

Widget to select Font Awesome symbol for Yii2.

README 文档

README

Widget to select a symbol from the Font Awesome collection for Yii 2.0 PHP Framework.

SymbolPicker lets you select the class name for a symbol in Font Awesome. It also lets you select class names for a color and for an additional effect.

A demonstration of SymbolPicker widget is here.

Prerequisite

SymbolPicker only makes sense if Font Awesome is loaded in your site. The easiest way to achieve this, is to add a line to the css property of the site's AppAsset.php file (look into the assets directory), like so:

<?php
class AppAsset extends AssetBundle
{
    public $css = [
    	'//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css',
    	'css/site.css'
		...	// other css files
	];
	...
}
?>

There are other methods to make Font Awesome available to your site.

Installation

The preferred way to install SymbolPicker is through Composer. Either add the following to the require section of your composer.json file:

"geoffry304/yii2-symbol-picker": "*"

Or run:

$ php composer.phar require geoffry304/yii2-symbol-picker "*"

You can manually install SymbolPicker by downloading the source in ZIP-format.

Using SymbolPicker

SymbolPicker is a Yii 2.0 InputWidget. Like any other InputWidget it can be associated with a model and an attribute (or with a name and a value).

Symbolpicker is in namespace geoffry304\symbolpicker.

For instance, to associate SymbolPicker with the attribute 'icon' in a form view, use code like this:

use geoffry304\symbolpicker\SymbolPicker;

...
<?= $form->field($model, 'icon')->widget(SymbolPicker::className()) ?>
...

options

SymbolPicker runs 'out of the box'. It has the following options to modify it's behaviour:

  • labels: list of labels used by the widget. If a label is set to false, the corresponding element is not rendered.
  • icons: list of selectable Font Awesome icons. Each item is the class name of an icon, without the 'fa-' part. So, for instance 'calculator' refers to the 'fa-calculator' icon. Default: all of the Font Awesome icons, excluding the aliases. Version 4.3. See: http://fontawesome.io/icons/.
  • colors: list of selectable colors. Each item is a color name, which will generate a 'col-***' color class name. For instance 'darkblue' refers to the class name 'col-darkblue'. Default: a selection of CSS3 named colors.
  • effects: list of selectable Font Awesome effects. Each item is the class name of an effect, without the 'fa-' part. So, for instance 'flip-horizontal' refers to the 'fa-flip-horizontal' effect. Default: most of the Font Awesome effects. Version 4.2.See: http://fontawesome.io/examples/#rotated-flipped.
  • buttonOptions: array of HTML options for the dropdown buttons. Default: [] (empty array). You may use this to set the CSS class of the buttons.

Of coarse, SymbolPicker also has the normal InputWidget properties.

Color classes

CSS color classes for all the CSS3 named colors are in the file assets\symbol-colors.css. You may use this in other parts of your project.

geoffry304/yii2-symbol-picker 适用场景与选型建议

geoffry304/yii2-symbol-picker 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 76 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 11 月 16 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「extension」 「yii」 「widget」 「yii2」 「font-awesome」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 geoffry304/yii2-symbol-picker 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 geoffry304/yii2-symbol-picker 我们能提供哪些服务?
定制开发 / 二次开发

基于 geoffry304/yii2-symbol-picker 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-16