singrana / yii2-suffixtree-behavior
Behavior for use suffix tree
Installs: 283
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
This package is not auto-updated.
Last update: 2025-04-22 05:21:39 UTC
README
Behavior for use suffix tree. This behavior attached to your model for usage hierarchical structure.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist singrana/yii2-suffixtree-behavior "*"
or add
"singrana/yii2-suffixtree-behavior": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
Add in your model behaviors method:
public function behaviors() { return [ ... 'suffixTree' => [ 'class' => 'singrana\behaviors\SuffixBehavior', ], ... ]; }
You can configure behavior:
fieldKey
- attribute for storage suffix key;fieldTranslit
- attribute for storage translit, null if not need;fieldUrl
- attribute for storage Url, null if not need;fieldParent
- attribute for storage parent field, null if not need different trees storage;fieldParentId
- attribute for parent node Id;fieldLevel
- attribute for storage level node, null if not need;