Function __global->results_header_row
Definitions
sources/templates_results_table.php
- Get the Tempcode for a results table header row. You would take the output of this, and feed it in as $header_row, in a results_table function call.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $values | array | No | No | required parameter | N/A | N/A | The array of field titles that header the entries in the results table (a null value will increment the previous non-null column's colspan - do not use any nulls if there is no previous non-null column) |
| $sortables | array | No | No | [] | N/A | N/A | A map of sortable code (usually, db field names), to strings giving the human name for the sort order |
| $order_param | ID_TEXT | No | No | sort | N/A | N/A | The parameter name used to store our sortable |
| $current_ordering | ID_TEXT | No | No | Blank (empty string) | N/A | N/A | The current ordering ("$sortable $sort_order") |
| $guid | string | No | No | fbcaf8b021e3939bfce1dce9ff8ed63a | N/A | N/A | GUID to pass to template |
| $interactive_options | ?array | No | No | Null | N/A | N/A | Array of tuples matching the indices of $values, each pair being a boolean whether the value is searchable, boolean whether the value is filterable, and a sortable type supported by sortable_tables.js (or null) (null: no interactivity) |
| $hash | ?ID_TEXT | No | No | Null | N/A | N/A | URL hash component without the # (null: none) |
Returns
- The generated header row
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the Tempcode for a results table header row. You would take the output of this, and feed it in as $header_row, in a results_table function call.
*
* @param array $values The array of field titles that header the entries in the results table (a null value will increment the previous non-null column's colspan - do not use any nulls if there is no previous non-null column)
* @param array $sortables A map of sortable code (usually, db field names), to strings giving the human name for the sort order
* @param ID_TEXT $order_param The parameter name used to store our sortable
* @param ID_TEXT $current_ordering The current ordering ("$sortable $sort_order")
* @param string $guid GUID to pass to template
* @param ?array $interactive_options Array of tuples matching the indices of $values, each pair being a boolean whether the value is searchable, boolean whether the value is filterable, and a sortable type supported by sortable_tables.js (or null) (null: no interactivity)
* @param ?ID_TEXT $hash URL hash component without the # (null: none)
* @return Tempcode The generated header row
*/
function results_header_row(array $values, array $sortables = [], string $order_param = 'sort', string $current_ordering = '', string $guid = 'fbcaf8b021e3939bfce1dce9ff8ed63a', ?array $interactive_options = null, ?string $hash = null) : object
* Get the Tempcode for a results table header row. You would take the output of this, and feed it in as $header_row, in a results_table function call.
*
* @param array $values The array of field titles that header the entries in the results table (a null value will increment the previous non-null column's colspan - do not use any nulls if there is no previous non-null column)
* @param array $sortables A map of sortable code (usually, db field names), to strings giving the human name for the sort order
* @param ID_TEXT $order_param The parameter name used to store our sortable
* @param ID_TEXT $current_ordering The current ordering ("$sortable $sort_order")
* @param string $guid GUID to pass to template
* @param ?array $interactive_options Array of tuples matching the indices of $values, each pair being a boolean whether the value is searchable, boolean whether the value is filterable, and a sortable type supported by sortable_tables.js (or null) (null: no interactivity)
* @param ?ID_TEXT $hash URL hash component without the # (null: none)
* @return Tempcode The generated header row
*/
function results_header_row(array $values, array $sortables = [], string $order_param = 'sort', string $current_ordering = '', string $guid = 'fbcaf8b021e3939bfce1dce9ff8ed63a', ?array $interactive_options = null, ?string $hash = null) : object

