2017 © Pedro Pelรกez
 

yii2-extension yii2-ztree

The zTree extension for the Yii framework 2.0

image

liyuze/yii2-ztree

The zTree extension for the Yii framework 2.0

  • Saturday, February 20, 2016
  • by liyuze
  • Repository
  • 1 Watchers
  • 7 Stars
  • 293 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 7 % Grown

The README.md

yii2-ztree

The zTree extension for the Yii framework 2.0, (*1)

Installation

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

Either run, (*3)

``` bash php composer.phar require --prefer-dist liyuze/yii2-ztree "*", (*4)

or add
``` bash
"liyuze/yii2-ztree": "*"

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

Usage

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

``` php = \liyuze\ztree\ZTree::widget([ 'setting' => '{ data: { simpleData: { enable: true } } }', 'nodes' => '[ { id:1, pId:0, name:"็ˆถ่Š‚็‚น1 - ๅฑ•ๅผ€", open:true}, { id:11, pId:1, name:"็ˆถ่Š‚็‚น11 - ๆŠ˜ๅ "}, { id:111, pId:11, name:"ๅถๅญ่Š‚็‚น111"}, { id:112, pId:11, name:"ๅถๅญ่Š‚็‚น112"}, { id:113, pId:11, name:"ๅถๅญ่Š‚็‚น113"}, { id:114, pId:11, name:"ๅถๅญ่Š‚็‚น114"}, { id:12, pId:1, name:"็ˆถ่Š‚็‚น12 - ๆŠ˜ๅ "}, { id:121, pId:12, name:"ๅถๅญ่Š‚็‚น121"}, { id:122, pId:12, name:"ๅถๅญ่Š‚็‚น122"}, { id:123, pId:12, name:"ๅถๅญ่Š‚็‚น123"}, { id:124, pId:12, name:"ๅถๅญ่Š‚็‚น124"}, { id:13, pId:1, name:"็ˆถ่Š‚็‚น13 - ๆฒกๆœ‰ๅญ่Š‚็‚น", isParent:true} ]' ]); ?>, (*7)


or, standard use it on your code by: ``` php = \liyuze\ztree\ZTree::widget([ 'id' => 'category_tree', //่‡ชๅฎšไน‰id 'setting' => '{ view: { dblClickExpand: false, showLine: false }, callback: { onClick: onClick } }', 'nodes' => '[ { name:"็ˆถ่Š‚็‚น1 - ๅฑ•ๅผ€", open:true, children: [ { name:"็ˆถ่Š‚็‚น11 - ๆŠ˜ๅ ", children: [ { name:"ๅถๅญ่Š‚็‚น111"}, { name:"ๅถๅญ่Š‚็‚น112"}, { name:"ๅถๅญ่Š‚็‚น113"}, { name:"ๅถๅญ่Š‚็‚น114"} ]}, { name:"็ˆถ่Š‚็‚น12 - ๆŠ˜ๅ ", children: [ { name:"ๅถๅญ่Š‚็‚น121"}, { name:"ๅถๅญ่Š‚็‚น122"}, { name:"ๅถๅญ่Š‚็‚น123"}, { name:"ๅถๅญ่Š‚็‚น124"} ]}, { name:"็ˆถ่Š‚็‚น13 - ๆฒกๆœ‰ๅญ่Š‚็‚น", isParent:true} ] } ]' ]); ?>

Extend

zTree GitHub zTree API zTree Demo, (*8)

The Versions

20/02 2016

dev-master

9999999-dev https://github.com/liyuze/yii2-ztree

The zTree extension for the Yii framework 2.0

  Sources   Download

BSD-3-Clause

The Requires

 

by li yuze

extension yii2 widget tree ztree

20/02 2016

1.0.0

1.0.0.0 https://github.com/liyuze/yii2-ztree

The zTree extension for the Yii framework 2.0

  Sources   Download

BSD-3-Clause

The Requires

 

by li yuze

extension yii2 widget tree ztree