aleslanger/checkboxtree
Composer 安装命令:
composer require aleslanger/checkboxtree
包简介
Checkbox Tree control for Nette Framework.
README 文档
README
Requirements
Installation
composer require aleslanger/checkboxtree
You can enable the extension using your neon config:
extensions: CheckBoxTree: aleslanger\Forms\CheckBoxTree\DI\CheckBoxTreeExtension
or register for example to bootstrap.php:
\aleslanger\Forms\CheckBoxTree\Bridges\ExtensionMethodRegistrator::register();
Usage
$form = new \Nette\Forms\Form; /* - First |___ - Third - Second */ $items = array( 1 => array('id' => 1, 'title' => 'First', 'parent_id' => ''), 2 => array('id' => 2, 'title' => 'Second', 'parent_id' => ''), 3 => array('id' => 3, 'title' => 'Third', 'parent_id' => 1),); $form->addCheckboxTree("list", "Label", $items);
the input array must contain keys (id, title, parent_id), key title is label for checkbox. The output is an array, the individual values are IDs.
License
The MIT License (MIT)
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-09-19