alexander-suter / yii2-tag-cloud
Yii2 标签云插件
2.0.2
2016-03-02 09:30 UTC
Requires
- yiisoft/yii2: 2.0.*
This package is not auto-updated.
Last update: 2020-08-07 19:58:24 UTC
README
Yii2 扩展。标签云。
安装
安装此扩展的首选方式是通过 composer。
要安装,请运行
$ php composer.phar require alexander-suter/yii2-tag-cloud "*"
或者将以下内容添加到你的 composer.json
文件的 require
部分:
"alexander-suter/yii2-tag-cloud": "*"
to the require
section of your composer.json
file.
使用方法
echo TagCloud::widget([
'beginColor' => '00089A',
'endColor' => 'A3AEFF',
'minFontSize' => 8,
'maxFontSize' => 15,
'displayWeight' => false,
'tags' => [
"MVC" => ['weight' => 2],
"PHP" => ['weight' => 9, 'url' => 'https://php.ac.cn'],
"MySQL" => ['weight' => 8, 'url' => 'https://mysqlserver.cn'],
"jQuery" => ['weight' => 6, 'url' => 'https://jqueryjs.cn'],
"SQL" => ['weight' => 9],
"C#" => ['weight' => 2)],
],
'options' => ['style' => 'word-wrap: break-word;']
]);