Skip to content
PHP Ecosystem
Explore

SortHeader

API reference › Debug Core › View › Grid › SortHeader

final readonly classPHPForge\Debug\View\Grid\SortHeader
ImplementsStringable
Sourcesrc/View/Grid/SortHeader.php

Represents the header cell of a sortable column, pairing the rendered sort link with the announced order.

PropertyTypeDescriptionDefined by
$attributes readonly constructorarray<string, string>Header cell attributes announcing the active order, empty while the rows are ordered by another attribute. Default: [].SortHeader
$link readonly constructorstringRendered link requesting the order of the next click.SortHeader
MethodDescriptionDefined by
__construct()Creates a sortable-column header with its announced order.SortHeader
__toString()Returns the rendered sort link of the header cell.SortHeader
public function __construct(string $link, array<string, string> $attributes = [])

Creates a sortable-column header with its announced order.

Parameters

ParameterTypeDescription
$linkstringRendered link requesting the order of the next click.
$attributesarray<string, string>Header cell attributes announcing the active order, empty while the rows are ordered by another attribute.
public function __toString(): string

Returns the rendered sort link of the header cell.

Returns

string: Rendered link.