Skip to content

Commit 7aedc3f

Browse files
committed
Updates to release v1.1.3
1 parent 2033124 commit 7aedc3f

26 files changed

+525
-249
lines changed

.gitattributes

Lines changed: 0 additions & 3 deletions
This file was deleted.

CHANGE.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ Change Log: `yii2-tree-manager`
33

44
## Version 1.1.3
55

6-
**Date:** _under development_
6+
**Date:** 04-Mar-2022
77

8+
- Enhancements for Bootstrap 5.x support.
9+
- PHP 8.1 enhancements for native functions.
810
- (bug #259): Correct icons list display based on `iconEditSettings['show']`.
911
- (enh #258): Enhanced BS4 custom checkbox and radio styling for toggle inputs.
1012
- (enh #257): Enhance search close icon styling.
@@ -16,7 +18,7 @@ Change Log: `yii2-tree-manager`
1618

1719
## Version 1.1.2
1820

19-
**Date:** 13-Mar-2019
21+
**Date:** 13-Mar-2021
2022

2123
- (enh #244): Correct hidden css to use `BS_HIDE` within `bsCssMap`.
2224
- (enh #240): Rename events triggered via jquery to start with `treeview:`.

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015 - 2019, Kartik Visweswaran
1+
Copyright (c) 2015 - 2022, Kartik Visweswaran
22
Krajee.com
33
All rights reserved.
44

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
<br>
66
yii2-tree-manager
77
<hr>
8+
<p align="center">
89
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DTP3NZQ6G2AYU"
9-
title="Donate via Paypal" target="_blank">
10-
<img src="http://kartik-v.github.io/bootstrap-fileinput-samples/samples/donate.png" alt="Donate"/>
11-
</a>
10+
title="Donate via Paypal" target="_blank"><img height="90" src="https://kartik-v.github.io/bootstrap-fileinput-samples/samples/donate.png" alt="Donate"/></a>
11+
&nbsp; &nbsp; &nbsp;
12+
<a href="https://www.buymeacoffee.com/kartikv" title="Buy me a coffee" ><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" align="top" height="50" alt="kartikv"/></a>
13+
</p>
1214
</h1>
1315

1416
[![Stable Version](https://poser.pugx.org/kartik-v/yii2-tree-manager/v/stable)](https://packagist.org/packages/kartik-v/yii2-tree-manager)
@@ -132,7 +134,7 @@ use Yii;
132134

133135
class Tree extends \yii\db\ActiveRecord
134136
{
135-
use kartik\tree\models\TreeTrait.
137+
use kartik\tree\models\TreeTrait;
136138

137139
/**
138140
* @inheritdoc

composer.json

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,42 @@
11
{
2-
"name": "kartik-v/yii2-tree-manager",
3-
"description": "An enhanced tree management module with tree node selection and manipulation using nested sets.",
4-
"keywords": [
5-
"bootstrap",
6-
"tree",
7-
"treeview",
8-
"krajee",
9-
"hierarchy",
10-
"nested",
11-
"set",
12-
"nestedset",
13-
"ajax",
14-
"jquery"
15-
],
16-
"homepage": "https://github.com/kartik-v/yii2-tree-manager",
17-
"type": "yii2-extension",
18-
"license": "BSD-3-Clause",
19-
"authors": [
20-
{
21-
"name": "Kartik Visweswaran",
22-
"email": "[email protected]",
23-
"homepage": "http://www.krajee.com/"
24-
}
25-
],
26-
"require": {
27-
"kartik-v/yii2-widget-activeform": ">=1.5.7",
28-
"creocoder/yii2-nested-sets": ">=0.9",
29-
"kartik-v/yii2-dialog": ">=1.0"
30-
},
31-
"autoload": {
32-
"psr-4": {
33-
"kartik\\tree\\": "src"
34-
}
35-
},
36-
"extra": {
37-
"branch-alias": {
38-
"dev-master": "1.1.x-dev"
39-
}
2+
"name": "kartik-v/yii2-tree-manager",
3+
"description": "An enhanced tree management module with tree node selection and manipulation using nested sets.",
4+
"keywords": [
5+
"bootstrap",
6+
"tree",
7+
"treeview",
8+
"krajee",
9+
"hierarchy",
10+
"nested",
11+
"set",
12+
"nestedset",
13+
"ajax",
14+
"jquery"
15+
],
16+
"homepage": "https://github.com/kartik-v/yii2-tree-manager",
17+
"type": "yii2-extension",
18+
"license": "BSD-3-Clause",
19+
"authors": [
20+
{
21+
"name": "Kartik Visweswaran",
22+
"email": "[email protected]",
23+
"homepage": "http://www.krajee.com/"
4024
}
25+
],
26+
"require": {
27+
"kartik-v/yii2-krajee-base": ">=3.0.4",
28+
"kartik-v/yii2-widget-activeform": ">=1.6.2",
29+
"creocoder/yii2-nested-sets": ">=0.9",
30+
"kartik-v/yii2-dialog": ">=1.0"
31+
},
32+
"autoload": {
33+
"psr-4": {
34+
"kartik\\tree\\": "src"
35+
}
36+
},
37+
"extra": {
38+
"branch-alias": {
39+
"dev-master": "1.1.x-dev"
40+
}
41+
}
4142
}

src/Module.php

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,81 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2019
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
55
* @package yii2-tree
66
* @version 1.1.3
77
*/
88

99
namespace kartik\tree;
1010

11+
use Yii;
1112
use yii\helpers\Url;
1213
use yii\helpers\ArrayHelper;
14+
use yii\web\Application as WebApplication;
1315

1416
/**
15-
* The tree management module for Yii Framework 2.0.
17+
* Module is the tree management module for Yii Framework 2.0 that enables the [[TreeView]] widget functionality.
1618
*
19+
* To use, configure the module named `treemanager` in the modules section of your Yii configuration file.
20+
*
21+
* For example,
22+
*
23+
* ```php
24+
* 'modules' => [
25+
* 'treemanager' => [
26+
* 'class' => '\kartik\tree\Module',
27+
* // other module settings, refer detailed documentation
28+
* ]
29+
* ]
30+
* ```
1731
* @author Kartik Visweswaran <[email protected]>
1832
* @since 1.0
1933
*/
2034
class Module extends \kartik\base\Module
2135
{
2236
/**
23-
* The module name for Krajee treeview
37+
* @var string module name for the Krajee Tree management module
2438
*/
2539
const MODULE = 'treemanager';
2640
/**
27-
* Manage node action
41+
* @var string manage node action
2842
*/
2943
const NODE_MANAGE = 'manage';
3044
/**
31-
* Remove node action
45+
* @var string remove node action
3246
*/
3347
const NODE_REMOVE = 'remove';
3448
/**
35-
* Move node action
49+
* @var string move node action
3650
*/
3751
const NODE_MOVE = 'move';
3852
/**
39-
* Save node action
53+
* @var string save node action
4054
*/
4155
const NODE_SAVE = 'save';
4256
/**
43-
* Tree details form view - Section Part 1
57+
* @var int section part 1 of the tree details form view
4458
*/
4559
const VIEW_PART_1 = 1;
4660
/**
47-
* Tree details form view - Section Part 2
61+
* @var int section part 2 of the tree details form view
4862
*/
4963
const VIEW_PART_2 = 2;
5064
/**
51-
* Tree details form view - Section Part 3
65+
* @var int section part 3 of the tree details form view
5266
*/
5367
const VIEW_PART_3 = 3;
5468
/**
55-
* Tree details form view - Section Part 4
69+
* @var int section part 4 of the tree details form view
5670
*/
5771
const VIEW_PART_4 = 4;
5872
/**
59-
* Tree details form view - Section Part 5
73+
* @var int section part 5 of the tree details form view
6074
*/
6175
const VIEW_PART_5 = 5;
6276

6377
/**
64-
* @var array the configuration of nested set attributes structure
78+
* @var array the configuration of nested set attributes structure.
6579
*/
6680
public $treeStructure = [];
6781

@@ -124,8 +138,7 @@ public function init()
124138
'iconTypeAttribute' => 'icon_type'
125139
];
126140
$nodeActions = ArrayHelper::getValue($this->treeViewSettings, 'nodeActions', []);
127-
// prepends Error in Console Applications
128-
if (\Yii::$app instanceof \yii\web\Application) {
141+
if (Yii::$app instanceof WebApplication) {
129142
$nodeActions += [
130143
self::NODE_MANAGE => Url::to(['/treemanager/node/manage']),
131144
self::NODE_SAVE => Url::to(['/treemanager/node/save']),

src/TreeSecurity.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2019
4+
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2022
55
* @package yii2-tree-manager
66
* @version 1.1.3
77
*/
@@ -19,7 +19,8 @@
1919
use yii\console\Application;
2020

2121
/**
22-
* Tree data security and data hashing helper class
22+
* Tree data security and data hashing helper class. This class and its methods are used by the [[TreeView]]
23+
* widget to manage data transfer between the client and the server in a secure way.
2324
*
2425
* @author Kartik Visweswaran <[email protected]>
2526
* @since 1.0

0 commit comments

Comments
 (0)