Final Class Yiisoft\Yii\DataView\GridView\Column\Base\DataContext
| Inheritance | Yiisoft\Yii\DataView\GridView\Column\Base\DataContext |
|---|
DataContext provides context information for rendering a data cell in a grid.
Public Properties
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Yii\DataView\GridView\Column\Base\DataContext |
Property Details
Method Details
| public mixed __construct ( \Yiisoft\Data\Reader\ReadableDataInterface|null $preparedDataReader, Yiisoft\Yii\DataView\GridView\Column\ColumnInterface $column, array|object $data, integer|string $key, integer $index ) | ||
| $preparedDataReader | \Yiisoft\Data\Reader\ReadableDataInterface|null |
The prepared data reader with applied filters, paginating
and sorting. |
| $column | Yiisoft\Yii\DataView\GridView\Column\ColumnInterface |
The column being rendered. This provides access to the column configuration and behavior definitions. |
| $data | array|object |
The data item being displayed. This can be either an array or an object containing the row's data. |
| $key | integer|string |
The key associated with the data item. This uniquely identifies the row in the dataset and can be used for generating URLs or implementing row operations. |
| $index | integer |
The zero-based index of the row in the data provider. This can be used for implementing alternate row styling or position-based logic. |
public function __construct(
public readonly ?ReadableDataInterface $preparedDataReader,
public readonly ColumnInterface $column,
public readonly array|object $data,
public readonly int|string $key,
public readonly int $index,
) {}
Signup or Login in order to comment.