2017 © Pedro Peláez
 

yii2-extension yii2-widget-nestable

image

wonail/yii2-widget-nestable

  • Friday, August 4, 2017
  • by ekevin228
  • Repository
  • 1 Watchers
  • 1 Stars
  • 146 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 3 % Grown

The README.md

yii2-widget-nestable

Nestable 小部件, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist wonail/yii2-widget-nestable "*"

or add, (*4)

"wonail/yii2-widget-nestable": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)

// 数据库里保存的数据,这里用json格式保存,部件读取时,直接decode解码即可
$value = '[{"group":"disable","title":"禁用","items":[]},{"group":"enable","title":"启用","items":[{"title":"修改头像","name":"change_avatar","id":1},{"title":"选择个人标签","name":"set_tag","id":3},{"title":"填写扩展资料","name":"expand_info","id":2}]}]';
echo $form->field($model, 'name')->widget(\wonail\nestable\Nestable::className(), [
    'items' => \yii\helpers\Json::decode($value),
    'pluginOptions' => [
        'group' => 1,
        'maxDepth' => 1
    ]
]);

The Versions

04/08 2017

dev-master

9999999-dev

  Sources   Download

BSD-3-Clause

The Requires

 

by E-Kevin

extension yii2 nestable wonail

04/08 2017

v1.2

1.2.0.0

  Sources   Download

BSD-3-Clause

by E-Kevin

extension yii2 nestable wonail

30/07 2017

v1.1

1.1.0.0

  Sources   Download

BSD-3-Clause

by E-Kevin

extension yii2 nestable wonail

19/07 2017

v1.0

1.0.0.0

  Sources   Download

BSD-3-Clause

by E-Kevin

extension yii2 nestable wonail