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

1.1.0 2020-01-25 05:37 UTC

This package is auto-updated.

Last update: 2024-04-25 15:33:52 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