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
Requires
- php: >=5.6.0
This package is auto-updated.
Last update: 2025-04-29 00:51:37 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',
]) ?>