drtsb / yii2-tag-cloud
Tagcloud for Yii2
Installs: 155
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: 2.0.*
This package is auto-updated.
Last update: 2024-11-19 12:03:27 UTC
README
Yii2 extension. Tag Cloud.
Installation
The preferred way to install this extension is through composer.
To install, either run
$ php composer.phar require drtsb/yii2-tag-cloud "*"
or add
"drtsb/yii2-tag-cloud": "*"
to the require
section of your composer.json
file.
Usage
echo TagCloud::widget([
'beginColor' => '00089A',
'endColor' => 'A3AEFF',
'minFontSize' => 8,
'maxFontSize' => 15,
'displayWeight' => false,
'tags' => [
"MVC" => ['weight' => 2],
"PHP" => ['weight' => 9, 'url' => 'http://php.net'],
"MySQL" => ['weight' => 8, 'url' => 'http://mysql.com'],
"jQuery" => ['weight' => 6, 'url' => 'http://jquery.com'],
"SQL" => ['weight' => 9],
"C#" => ['weight' => 2)],
],
'options' => ['style' => 'word-wrap: break-word;']
]);