dev-master
9999999-devYii2 Nestable
MIT
The Requires
by toir427
extension yii2 widget nestable
Yii2 Nestable
Yii2 Nestable, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist toir427/yii2-nestable "*"
or add, (*4)
"toir427/yii2-nestable": "*"
to the require section of your composer.json
file., (*5)
, (*6)
Basic nestables :, (*7)
<?php use toir427\nestable\Nestable; ?> <?= Nestable::widget([ 'items' => [ [ 'id' => 1, 'content' => 'Item # 1', ], [ 'id' => 2, 'content' => 'Item # 2', ], [ 'id' => 3, 'content' => 'Item # 3', ], [ 'content' => 'Item # 4 with children', 'id' => 4, 'children' => [ [ 'id' => 5, 'content' => 'Item # 4.1', ], [ 'id' => 6, 'content' => 'Item # 4.2', ], [ 'id' => 7, 'content' => 'Item # 4.3', ], ], ], ], ]); ?>
Drag handler :, (*8)
<?php use toir427\nestable\Nestable; ?> <?= DragNestable::widget([ 'items' => [ [ 'id' => 1, 'content' => 'Item # 1', ], [ 'id' => 2, 'content' => 'Item # 2', ], [ 'id' => 3, 'content' => 'Item # 3', ], [ 'content' => 'Item # 4 with children', 'id' => 4, 'children' => [ [ 'id' => 5, 'content' => 'Item # 4.1', ], [ 'id' => 6, 'content' => 'Item # 4.2', ], [ 'id' => 7, 'content' => 'Item # 4.3', ], ], ], ], ]); ?>
Yii2 Nestable
MIT
extension yii2 widget nestable