drtsb/yii2-tag-cloud

Tagcloud for Yii2

Installs: 154

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 0

Type:yii2-extension

1.0.0 2020-09-13 17:53 UTC

This package is auto-updated.

Last update: 2024-04-19 10:46:23 UTC


README

Latest Stable Version Total Downloads

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