Function Hook_task_export_members->run

Definitions

sources/hooks/systems/tasks/export_members.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_by_allow boolean No No required parameter N/A N/A Only provide members that have "Receive newsletters and other site updates" set
$fields_to_use array No No required parameter N/A N/A List of fields to use (empty: none)
$usergroups array No No required parameter N/A N/A List of usergroups to use (empty: all)
$order_by string No No required parameter N/A N/A Field to order by
$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  boolean $filter_by_allow Only provide members that have "Receive newsletters and other site updates" set
 * @param  array $fields_to_use List of fields to use (empty: none)
 * @param  array $usergroups List of usergroups to use (empty: all)
 * @param  string $order_by Field to order by
 * @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(bool $filter_by_allow, array $fields_to_use, array $usergroups, string $order_by, ?string $file_type = null) : ?array