This repository has been archived by the owner on Oct 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c97753
commit a98305d
Showing
4 changed files
with
947 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,22 +3,21 @@ | |
namespace leandrogehlen\treegrid; | ||
|
||
use Closure; | ||
use Yii; | ||
use yii\base\Model; | ||
use yii\base\Object; | ||
use yii\base\BaseObject; | ||
use yii\data\ActiveDataProvider; | ||
use yii\db\ActiveQueryInterface; | ||
use yii\helpers\ArrayHelper; | ||
use yii\helpers\Html; | ||
use yii\helpers\Inflector; | ||
use yii\helpers\ArrayHelper; | ||
|
||
/** | ||
* Column is the base class of all [[TreeGrid]] column classes. | ||
* The code was based in: https://github.com/yiisoft/yii2/blob/master/framework/grid/DataColumn.php | ||
* | ||
* @author Leandro Gehlen <[email protected]> | ||
*/ | ||
class TreeColumn extends Object | ||
class TreeColumn extends BaseObject | ||
{ | ||
/** | ||
* @var TreeGrid the grid view object that owns this column. | ||
|
@@ -44,7 +43,7 @@ class TreeColumn extends Object | |
public $content; | ||
|
||
/** | ||
* @var boolean whether this column is visible. Defaults to true. | ||
* @var bool whether this column is visible. Defaults to true. | ||
*/ | ||
public $visible = true; | ||
|
||
|
@@ -96,7 +95,7 @@ class TreeColumn extends Object | |
public $label; | ||
|
||
/** | ||
* @var boolean whether the header label should be HTML-encoded. | ||
* @var bool whether the header label should be HTML-encoded. | ||
* @see label | ||
*/ | ||
public $encodeLabel = true; | ||
|
@@ -145,7 +144,7 @@ public function renderFooterCell() | |
* Renders a data cell. | ||
* @param mixed $model the data model being rendered | ||
* @param mixed $key the key associated with the data model | ||
* @param integer $index the zero-based index of the data item among the item array returned by [[GridView::dataProvider]]. | ||
* @param int $index the zero-based index of the data item among the item array returned by [[GridView::dataProvider]]. | ||
* @return string the rendering result | ||
*/ | ||
public function renderDataCell($model, $key, $index) | ||
|
@@ -208,7 +207,7 @@ protected function renderFooterCellContent() | |
* Renders the data cell content. | ||
* @param mixed $model the data model | ||
* @param mixed $key the key associated with the data model | ||
* @param integer $index the zero-based index of the data model among the models array returned by [[GridView::dataProvider]]. | ||
* @param int $index the zero-based index of the data model among the models array returned by [[GridView::dataProvider]]. | ||
* @return string the rendering result | ||
*/ | ||
protected function renderDataCellContent($model, $key, $index) | ||
|
@@ -228,7 +227,7 @@ protected function renderDataCellContent($model, $key, $index) | |
* Returns the data cell value. | ||
* @param mixed $model the data model | ||
* @param mixed $key the key associated with the data model | ||
* @param integer $index the zero-based index of the data model among the models array returned by [[GridView::dataProvider]]. | ||
* @param int $index the zero-based index of the data model among the models array returned by [[GridView::dataProvider]]. | ||
* @return string the data cell value | ||
*/ | ||
public function getDataCellValue($model, $key, $index) | ||
|
@@ -244,4 +243,4 @@ public function getDataCellValue($model, $key, $index) | |
} | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.