Download the PHP package valentinek/yii2-closure-table-behavior without Composer
On this page you can find all versions of the php package valentinek/yii2-closure-table-behavior. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download valentinek/yii2-closure-table-behavior
More information about valentinek/yii2-closure-table-behavior
Files in valentinek/yii2-closure-table-behavior
Package yii2-closure-table-behavior
Short Description This extension allows you to get functional for closure table trees.
License BSD-3-Clause
Homepage https://github.com/BioSin/yii2-closure-table-behavior
Informations about the package yii2-closure-table-behavior
Closure table behavior for Yii2
Yii2 port of the yii-closure-table-behavior. Extension allows managing trees stored in database via closure-table method.
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Configuring
First you need to configure model as follows:
Second you need to configure query model as follows:
Migrations / Changing database schema
After configuring your model, you must copy migration file from behavior migrations folder to your project migrations folder. Please read the comments in file, change migration as you need and run migration:
Also you change database schema directly using an example from .sql dump file in schema folder.
Road map
1. Write documentation
2. Write tests
3. bug fixes
4. EVENT_DELETE
5. DeleteNode method refactoring
6. isAncestor() and isDescendant() methods