dasturchiuz / treebehaviorcategories
NestedSetsTreeBehavior for build array
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- creocoder/yii2-nested-sets: ^0.9.0
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2025-03-25 17:27:59 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