SortHeader
API reference › Debug Core › View › Grid › SortHeader
Represents the header cell of a sortable column, pairing the rendered sort link with the announced order.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$attributes readonly constructor | array<string, | Header cell attributes announcing the active order, empty while the rows are ordered by another attribute. Default: []. | SortHeader |
$link readonly constructor | string | Rendered link requesting the order of the next click. | SortHeader |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates a sortable-column header with its announced order. | SortHeader |
__toString() | Returns the rendered sort link of the header cell. | SortHeader |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(string $link, array<string, string> $attributes = [])Creates a sortable-column header with its announced order.
Parameters
| Parameter | Type | Description |
|---|---|---|
$link | string | Rendered link requesting the order of the next click. |
$attributes | array<string, | Header cell attributes announcing the active order, empty while the rows are ordered by another attribute. |
__toString()
Section titled “__toString() ”public function __toString(): stringReturns the rendered sort link of the header cell.
Returns
string: Rendered link.