thtmorais/yii2-dropdown

Dropdown button - Dynamic change actions for Yii PHP Framework

Installs: 375

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

0.0.1 2021-04-09 05:40 UTC

This package is auto-updated.

Last update: 2021-09-14 01:27:30 UTC


README

Dropdown button - Dynamic change actions for Yii PHP Framework

Installation

The preferred way to install this extension is through composer.

Either run

composer require thtmorais/yii2-dropdown "*"

or add

"thtmorais/yii2-dropdown": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= Dropdown::widget([
    'dropdownToggleClass' => 'btn btn-lg btn-success',
    'main' => [
        'id' => 'getStartedWithYii',
        'href' => 'http://www.yiiframework.com/',
        'class' => 'btn btn-lg btn-success',
        'text' => 'Get started with Yii'
    ],
    'subordinate' => [
        [
            'id' => 'yiiDocumentation',
            'href' => 'http://www.yiiframework.com/doc/',
            'text' => 'Yii Documentation'
        ],
        [
            'id' => 'yiiForum',
            'href' => 'http://www.yiiframework.com/forum/',
            'text' => 'Yii Forum'
        ],
        [
            'id' => 'yiiExtensions',
            'href' => 'http://www.yiiframework.com/extensions/',
            'text' => 'Yii Extensions'
        ]
    ]
]) ?>

Example being executed

dropdown