2017 © Pedro Peláez
 

yii2-extension yii2-nestable

Yii2 Nestable

image

toir427/yii2-nestable

Yii2 Nestable

  • Saturday, March 3, 2018
  • by toir427
  • Repository
  • 1 Watchers
  • 0 Stars
  • 50 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 43 % Grown

The README.md

Yii2 Nestable

Yii2 Nestable, (*1)

Installation

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)

Screenshot

, (*6)

Usage

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

Usage

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

The Versions

03/03 2018

dev-master

9999999-dev

Yii2 Nestable

  Sources   Download

MIT

The Requires

 

by Avatar toir427

extension yii2 widget nestable