Function Hook_notification_cns_topic->_is_member

Definitions

sources/hooks/systems/notifications/cns_topic.php

  • Find whether someone has permission to view any notifications (yes) and possibly if they actually are.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$only_if_enabled_on__notification_code ?ID_TEXT No No required parameter N/A N/A Notification code (null: don't check if they are)
$only_if_enabled_on__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 Member to check against

Returns

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

Preview

Code (PHP)

/**
 * Find whether someone has permission to view any notifications (yes) and possibly if they actually are.
 *
 * @param  ?ID_TEXT $only_if_enabled_on__notification_code Notification code (null: don't check if they are)
 * @param  ?SHORT_TEXT $only_if_enabled_on__category The category within the notification code (null: none)
 * @param  MEMBER $member_id Member to check against
 * @return boolean Whether they do
 */

protected function _is_member(?string $only_if_enabled_on__notification_code, ?string $only_if_enabled_on__category, int $member_id) : bool