walkboy/yii2-indeterminate-checkbox-list

Yii2 multi-level checkbox list

Installs: 49

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

pkg:composer/walkboy/yii2-indeterminate-checkbox-list

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

This package is auto-updated.

Last update: 2025-09-29 01:37:58 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',
]) ?>