dasturchiuz / treebehaviorcategories
NestedSetsTreeBehavior for build array
Package info
github.com/dasturchiuz/yii2treeArray
Type:yii2-extension
pkg:composer/dasturchiuz/treebehaviorcategories
1.1.0
2020-01-25 05:37 UTC
Requires
- creocoder/yii2-nested-sets: ^0.9.0
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2026-03-25 19:32:44 UTC
README
NestedSetsTreeBehavior this is the connector between https://github.com/creocoder/yii2-nested-sets
Installation
The preferred way to install this extension is through composer.
Either run
composer require dasturchiuz/treebehaviorcategories
or add
"dasturchiuz/treebehaviorcategories": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your model :
'htmlTreeCategory'=>[ 'class' => \dasturchiuz\treebehaviorcategories\NestedSetsTreeBehavior::className() ]
use
SomeModel::findOne($id)->treeCategory()
to get arrays