walkboy/yii2-indeterminate-checkbox-list

Yii2 multi-level checkbox list

dev-master 2017-05-02 22:10 UTC

This package is auto-updated.

Last update: 2024-04-29 04:12:31 UTC


README

Yii2 implementation of this demo: https://css-tricks.com/examples/IndeterminateCheckboxes/

Installation

Add "walkboy/yii2-indeterminate-checkbox-list": "dev-master" to composer.json and run composer update

Usage

<?= \walkboy\IndeterminateCheckboxList\IndeterminateCheckboxList::widget([
    'model' => $model,
    'attribute' => 'categories_array',
    'source' => Work::find()->orderBy('title')->where('parent_id IS NULL')->orderBy('parent_id')->all(),
    'parent_attribute_name' => 'parent_id',
    'children_attribute_name' => 'children',
]) ?>