iutbay/yii2-jstree

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (v0.1) of this package.

JsTree for Yii2

Maintainers

Package info

github.com/iutbay/yii2-jstree

Issues

Type:yii2-extension

pkg:composer/iutbay/yii2-jstree

Statistics

Installs: 509

Dependents: 0

Suggesters: 0

Stars: 2

v0.1 2014-12-28 21:04 UTC

This package is not auto-updated.

Last update: 2025-10-21 08:38:08 UTC


README

JsTree for Yii2.

WIP...

Installation

The preferred way to install this helper is through composer.

Either run

php composer.phar require "iutbay/yii2-jstree" "*"

or add

"iutbay/yii2-jstree" : "*"

to the require section of your application's composer.json file.

https://packagist.org/packages/iutbay/yii2-jstree

Usage

With model and ActiveForm :

<?= $form->field($model, 'test')->widget(\iutbay\yii2jstree\JsTree::className(), [
	'items' => [
		[
			'id' => 1,
			'text' => 'Test 1',
			'children' => [
				[
					'id' => 2,
					'text' => 'Test 2',
				],
			],
		],
		[
			'id' => 3,
			'text' => 'Test 3',
			'icon' => 'fa fa-file',	// font awesome icon
		],
	],
]) ?>

Without model :

<?= \iutbay\yii2jstree\JsTree::widget([
	'name' => 'test',
	'value' => '1,2',
	'items' => [
		[
			'id' => 1,
			'text' => 'Test 1',
			'children' => [
				[
					'id' => 2,
					'text' => 'Test 2',
				],
			],
		],
		[
			'id' => 3,
			'text' => 'Test 3',
			'icon' => 'fa fa-file',	// font awesome icon
		],
	],
]) ?>