Function Hook_notification_poll_chosen->get_initial_setting

Definitions

sources/hooks/systems/notifications/poll_chosen.php

  • Find the initial setting that members have for a notification code (only applies to the member_could_potentially_enable members).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$notification_code ID_TEXT No No required parameter N/A N/A Notification code
$category ?SHORT_TEXT No No required parameter N/A N/A The category within the notification code (null: none)
$member_id MEMBER No No required parameter N/A N/A The member the notification would be for

Returns

  • Initial setting
  • Type: integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find the initial setting that members have for a notification code (only applies to the member_could_potentially_enable members).
 *
 * @param  ID_TEXT $notification_code Notification code
 * @param  ?SHORT_TEXT $category The category within the notification code (null: none)
 * @param  MEMBER $member_id The member the notification would be for
 * @return integer Initial setting
 */

public function get_initial_setting(string $notification_code, ?string $category, int $member_id) : int