0 follower

Final Class Yiisoft\Yii\DataView\GridView\Column\SerialColumn

InheritanceYiisoft\Yii\DataView\GridView\Column\SerialColumn
ImplementsYiisoft\Yii\DataView\GridView\Column\ColumnInterface

SerialColumn displays a column of sequential row numbers (1-based) in a grid view.

Property Details

Hide inherited properties

$bodyAttributes public property
public array $bodyAttributes = []
$columnAttributes public property
$footer public property
public string|null $footer null
$header public property
public string|null $header null

Method Details

Hide inherited methods

__construct() public method

Creates a new SerialColumn instance.

public mixed __construct ( string|null $header null, string|null $footer null, array $columnAttributes = [], array $bodyAttributes = [], boolean $visible true )
$header string|null

The header cell content. If null, no header will be rendered.

$footer string|null

The footer cell content. If null, no footer will be rendered.

$columnAttributes array

HTML attributes for all column cells.

$bodyAttributes array

HTML attributes for the body cells.

$visible boolean

Whether the column is visible.

                public function __construct(
    public readonly ?string $header = null,
    public readonly ?string $footer = null,
    public readonly array $columnAttributes = [],
    public readonly array $bodyAttributes = [],
    private readonly bool $visible = true,
) {}

            
getRenderer() public method

public string getRenderer ( )

                public function getRenderer(): string
{
    return SerialColumnRenderer::class;
}

            
isVisible() public method

public boolean isVisible ( )

                public function isVisible(): bool
{
    return $this->visible;
}