Final Class Yiisoft\Yii\DataView\GridView\BodyRowContext
| Inheritance | Yiisoft\Yii\DataView\GridView\BodyRowContext |
|---|
BodyRowContext provides contextual information for rendering a table body row in data views.
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $data | array|object | Yiisoft\Yii\DataView\GridView\BodyRowContext | |
| $index | integer | Yiisoft\Yii\DataView\GridView\BodyRowContext | |
| $key | integer|string | Yiisoft\Yii\DataView\GridView\BodyRowContext |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Creates a new instance of body row context. | Yiisoft\Yii\DataView\GridView\BodyRowContext |
Property Details
Method Details
Creates a new instance of body row context.
| public __construct( array|object $data, integer|string $key, integer $index ): mixed | ||
| $data | array|object |
The data for the current row. Can be either an array or an object containing the row's data. |
| $key | integer|string |
The unique identifier for the row. This can be either an integer or a string that uniquely identifies the row in the dataset. |
| $index | integer |
The zero-based index of the row in the dataset. This represents the row's position in the current page of results. |
public function __construct(
public readonly array|object $data,
public readonly int|string $key,
public readonly int $index,
) {}
Signup or Login in order to comment.