项目作者: thtmorais

项目描述 :
Dropdown button - Dynamic change actions for Yii PHP Framework
高级语言: PHP
项目地址: git://github.com/thtmorais/yii2-dropdown.git
创建时间: 2021-04-08T04:04:54Z
项目社区:https://github.com/thtmorais/yii2-dropdown

开源协议:MIT License

下载


Dropdown button - Dynamic change actions for Yii PHP Framework

Dropdown button - Dynamic change actions for Yii PHP Framework

Installation

The preferred way to install this extension is through composer.

Either run

  1. composer require thtmorais/yii2-dropdown "*"

or add

  1. "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 :

  1. <?= Dropdown::widget([
  2. 'dropdownToggleClass' => 'btn btn-lg btn-success',
  3. 'main' => [
  4. 'id' => 'getStartedWithYii',
  5. 'href' => 'http://www.yiiframework.com/',
  6. 'class' => 'btn btn-lg btn-success',
  7. 'text' => 'Get started with Yii'
  8. ],
  9. 'subordinate' => [
  10. [
  11. 'id' => 'yiiDocumentation',
  12. 'href' => 'http://www.yiiframework.com/doc/',
  13. 'text' => 'Yii Documentation'
  14. ],
  15. [
  16. 'id' => 'yiiForum',
  17. 'href' => 'http://www.yiiframework.com/forum/',
  18. 'text' => 'Yii Forum'
  19. ],
  20. [
  21. 'id' => 'yiiExtensions',
  22. 'href' => 'http://www.yiiframework.com/extensions/',
  23. 'text' => 'Yii Extensions'
  24. ]
  25. ],
  26. 'options' => [
  27. 'id' => 'group-dropdown',
  28. 'class' => 'p-1'
  29. ]
  30. ]) ?>

Example being executed

dropdown