0 follower

Final Class Yiisoft\Yii\DataView\GridView\BodyRowContext

InheritanceYiisoft\Yii\DataView\GridView\BodyRowContext

BodyRowContext provides contextual information for rendering a table body row in data views.

Public Methods

Hide inherited methods

Method Description Defined By
__construct() Creates a new instance of body row context. Yiisoft\Yii\DataView\GridView\BodyRowContext

Property Details

Hide inherited properties

$data public property
public array|object $data null
$index public property
public integer $index null
$key public property
public integer|string $key null

Method Details

Hide inherited methods

__construct() public method

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,
) {}