Function Hook_privacy_base->get_selection_sql

Definitions

sources/privacy.php

  • Get selection SQL for a particular search.You should run fill_in_missing_privacy_criteria before running this.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$table_name ID_TEXT No No required parameter N/A N/A Table name
$table_details array No No required parameter N/A N/A Details from the info function for the given table
$table_action integer No No required parameter N/A N/A A PRIVACY_METHOD_* constant which we plan to execute on this table
$purge_retention boolean No No False N/A N/A Whether to only return records which should no longer be retained (false: do not consider retention period)
$username ID_TEXT No No Blank (empty string) N/A N/A Username to search for (blank: none)
$ip_addresses array No No [] N/A N/A List of IP addresses to search for
$member_id ?MEMBER No No Null N/A N/A Member ID to search for (null: none)
$email_address string No No Blank (empty string) N/A N/A E-mail address to search for (blank: none)
$others array No No [] N/A N/A List of other strings to search for, via additional-anonymise-fields

Returns

  • The stem of the SQL query (blank: do not run this search as there are no filters)
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get selection SQL for a particular search.You should run fill_in_missing_privacy_criteria before running this.
 *
 * @param  ID_TEXT $table_name Table name
 * @param  array $table_details Details from the info function for the given table
 * @param  integer $table_action A PRIVACY_METHOD_* constant which we plan to execute on this table
 * @param  boolean $purge_retention Whether to only return records which should no longer be retained (false: do not consider retention period)
 * @param  ID_TEXT $username Username to search for (blank: none)
 * @param  array $ip_addresses List of IP addresses to search for
 * @param  ?MEMBER $member_id Member ID to search for (null: none)
 * @param  string $email_address E-mail address to search for (blank: none)
 * @param  array $others List of other strings to search for, via additional-anonymise-fields
 * @return string The stem of the SQL query (blank: do not run this search as there are no filters)
 */

public function get_selection_sql(string $table_name, array $table_details, int $table_action, bool $purge_retention = false, string $username = '', array $ip_addresses = [], ?int $member_id = null, string $email_address = '', array $others = []) : string