Function Hook_task_export_shopping_orders->run
Definitions
sources/hooks/systems/tasks/export_shopping_orders.php
- Run the task hook.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $filter_id | ?AUTO_LINK | No | No | Null | N/A | N/A | Filter by order ID (null: do not filter) |
| $filter_username | ID_TEXT | No | No | Blank (empty string) | N/A | N/A | Filter by customer username (blank: do not filter) |
| $filter_txn_id | ID_TEXT | No | No | Blank (empty string) | N/A | N/A | Filter by transaction ID (blank: do not filter) |
| $_filter_order_status | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | Filter by comma-delimited order statuses (blank: do not filter) |
| $filter_start | ?TIME | No | No | Null | N/A | N/A | Only include orders on or after this date/time (null: do not filter) |
| $filter_end | ?TIME | No | No | Null | N/A | N/A | Only include orders on or before this date/time (null: do not filter) |
| $file_type | ?string | No | No | Null | N/A | N/A | The file type to export with (null: default) |
Returns
- A tuple of at least 2: Return mime-type, content (either Tempcode, or a string, or a filename and file-path pair to a temporary file), map of HTTP headers if transferring immediately, map of ini_set commands if transferring immediately (null: show standard success message)
- Type: ?array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Run the task hook.
*
* @param ?AUTO_LINK $filter_id Filter by order ID (null: do not filter)
* @param ID_TEXT $filter_username Filter by customer username (blank: do not filter)
* @param ID_TEXT $filter_txn_id Filter by transaction ID (blank: do not filter)
* @param SHORT_TEXT $_filter_order_status Filter by comma-delimited order statuses (blank: do not filter)
* @param ?TIME $filter_start Only include orders on or after this date/time (null: do not filter)
* @param ?TIME $filter_end Only include orders on or before this date/time (null: do not filter)
* @param ?string $file_type The file type to export with (null: default)
* @return ?array A tuple of at least 2: Return mime-type, content (either Tempcode, or a string, or a filename and file-path pair to a temporary file), map of HTTP headers if transferring immediately, map of ini_set commands if transferring immediately (null: show standard success message)
*/
public function run(?int $filter_id = null, string $filter_username = '', string $filter_txn_id = '', string $_filter_order_status = '', ?int $filter_start = null, ?int $filter_end = null, ?string $file_type = null) : ?array
* Run the task hook.
*
* @param ?AUTO_LINK $filter_id Filter by order ID (null: do not filter)
* @param ID_TEXT $filter_username Filter by customer username (blank: do not filter)
* @param ID_TEXT $filter_txn_id Filter by transaction ID (blank: do not filter)
* @param SHORT_TEXT $_filter_order_status Filter by comma-delimited order statuses (blank: do not filter)
* @param ?TIME $filter_start Only include orders on or after this date/time (null: do not filter)
* @param ?TIME $filter_end Only include orders on or before this date/time (null: do not filter)
* @param ?string $file_type The file type to export with (null: default)
* @return ?array A tuple of at least 2: Return mime-type, content (either Tempcode, or a string, or a filename and file-path pair to a temporary file), map of HTTP headers if transferring immediately, map of ini_set commands if transferring immediately (null: show standard success message)
*/
public function run(?int $filter_id = null, string $filter_username = '', string $filter_txn_id = '', string $_filter_order_status = '', ?int $filter_start = null, ?int $filter_end = null, ?string $file_type = null) : ?array

