Function Hook_Notification->_all_members_who_have_enabled_with_privilege

Definitions

sources/notifications.php

  • Further filter results from _all_members_who_have_enabled.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$to_filter array No No required parameter N/A N/A Members from main query (we'll filter them)
$privilege ID_TEXT No No required parameter N/A N/A The privilege
$only_if_enabled_on__notification_code ID_TEXT No No required parameter N/A N/A Notification code
$only_if_enabled_on__category ?SHORT_TEXT No No required parameter N/A N/A The category within the notification code (null: none)
$to_member_ids ?array No No required parameter N/A N/A List of member IDs we are restricting to (null: no restriction). This effectively works as a intersection set operator against those who have enabled.
$start integer No No required parameter N/A N/A Start position (for pagination)
$max integer No No required parameter N/A N/A Maximum (for pagination)

Returns

  • A pair: Map of members to their notification setting, and whether there may be more
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Further filter results from _all_members_who_have_enabled.
 *
 * @param  array $to_filter Members from main query (we'll filter them)
 * @param  ID_TEXT $privilege The privilege
 * @param  ID_TEXT $only_if_enabled_on__notification_code Notification code
 * @param  ?SHORT_TEXT $only_if_enabled_on__category The category within the notification code (null: none)
 * @param  ?array $to_member_ids List of member IDs we are restricting to (null: no restriction). This effectively works as a intersection set operator against those who have enabled.
 * @param  integer $start Start position (for pagination)
 * @param  integer $max Maximum (for pagination)
 * @return array A pair: Map of members to their notification setting, and whether there may be more
 */

protected function _all_members_who_have_enabled_with_privilege(array $to_filter, string $privilege, string $only_if_enabled_on__notification_code, ?string $only_if_enabled_on__category, ?array $to_member_ids, int $start, int $max) : array