Skip to content

toir427/yii2-nestable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 Nestable

Yii2 Nestable

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"toir427/yii2-nestable": "*"

to the require section of your composer.json file.

Screenshot

Usage

Basic nestables :

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

Usage

Drag handler :

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

About

Yii 2.0 jquery.nestable extension

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages