Function Hook_notification_ticket_assigned_staff->member_has_enabled

Definitions

sources/hooks/systems/notifications/ticket_assigned_staff.php

  • Find whether a member has enabled this notification (i.e. have permission to AND have chosen to or are defaulted to).(Separate implementation to list_members_who_have_enabled, for performance reasons).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

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
$member_id MEMBER No No required parameter N/A N/A Member to check against
$category ?SHORT_TEXT No No Null N/A N/A The category within the notification code (null: none)

Returns

  • Whether they have
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find whether a member has enabled this notification (i.e. have permission to AND have chosen to or are defaulted to).(Separate implementation to list_members_who_have_enabled, for performance reasons).
 *
 * @param  ID_TEXT $notification_code Notification code
 * @param  MEMBER $member_id Member to check against
 * @param  ?SHORT_TEXT $category The category within the notification code (null: none)
 * @return boolean Whether they have
 */

public function member_has_enabled(string $notification_code, int $member_id, ?string $category = null) : bool