mztest/yii2-widget-infinite-level

1.0 2017-08-10 07:56 UTC

This package is not auto-updated.

Last update: 2024-04-27 17:20:50 UTC


README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist mztest/yii2-widget-infinite-level "*"

or add

"mztest/yii2-widget-infinite-level": "*"

to the require section of your composer.json file.

Usage

Simply use it in your code by :

use mztest\infiniteLevel\InfiniteLevel;
<?= $form->field($model, 'parent_id')->widget(InfiniteLevel::className(), [
    'items' => [['value' => 'value1', 'label' =>'label1'], ['value' => 'value2', 'label' =>'label2']],
    'itemParents' => ['Parents ID here']
]) ?>