wdmg/yii2-tagsinput
Composer 安装命令:
composer require wdmg/yii2-tagsinput
包简介
Bootstrap3 tags input widget for Yii2
README 文档
README
Yii2 TagsInput
Tags input widget for Yii2
Requirements
- PHP 5.6 or higher
- Yii2 v.2.0.33 and newest
- Yii2 Bootstrap
- Bootstrap TagsInput
Installation
To install the widget, run the following command in the console:
$ composer require "wdmg/yii2-tagsinput"
Usage
Example of standalone widget:
<?php
use wdmg\widgets\TagsInput;
...
echo TagsInput::widget([
'model' => $model,
'attribute' => 'post_tags',
'options' => [
'class' => 'form-control'
],
'pluginOptions' => [
'minInput' => 2,
'maxTags' => 100
]
]);
?>
Example of use with ActiveForm:
<?php
use wdmg\widgets\TagsInput;
...
$form = ActiveForm::begin();
...
echo $form->field($model, 'tags')->widget(TagsInput::class, [
'options' => [
'id' => 'post-tags',
'class' => 'form-control',
'placeholder' => 'Type your tags here...'
],
'pluginOptions' => [
'autocomplete' => '//example.com/api/',
'format' => 'json',
'minInput' => 2,
'maxTags' => 100
]
]);
...
ActiveForm::end();
?>
Options
TagsInput extends InputWidget so you can use any options available for this widget. In addition, you can use these custom options if necessary:
| Name | Type | Default | Description |
|---|---|---|---|
| options | array | ['class' => 'form-control'] |
Standard options for the input widget. |
| pluginOptions | array | array() | Plugin TagsInput options passed to js. Read more here (https://github.com/wdmg/bootstrap-tagsinput). |
| items | array | ['value' => 'Label'] |
Array values with labels. |
Status and version [ready to use]
- v.1.0.4 - Fixed widget ID and init after Pjax reloading
- v.1.0.3 - Up to date dependencies
- v.1.0.2 - Fixed deprecated class declaration and added README.md
wdmg/yii2-tagsinput 适用场景与选型建议
wdmg/yii2-tagsinput 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.88k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2019 年 11 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「bootstrap」 「extension」 「tags」 「input」 「yii」 「widget」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 wdmg/yii2-tagsinput 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wdmg/yii2-tagsinput 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 wdmg/yii2-tagsinput 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A powerfull cacher based on laravels file cache driver
A custom URL rule class for Yii 2 which allows to create translated URL rules
Phalcon PHP Meta tags service
The Yii2 extension uses jQuery jquery.carousel-1.1.min.js and makes image carousel from php array of structure defined.
TYPO3 CMS extension to create gallery content element with preset crop ratios and pagination
UI Kit 3 Extension for Yii2
统计信息
- 总下载量: 3.88k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 18
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-11-26