34 $prefered =
$user->getNotificationSettings();
35 $methods = array_keys(array_filter($prefered));
172 public function getSubscribers(
$methods = []): array {
185 public function muteNotifications(
int $user_guid = 0): bool {
200 public function hasMutedNotifications(
int $user_guid = 0): bool {
215 public function unmuteNotifications(
int $user_guid = 0): bool {
231 protected function normalizeSubscriptionMethods(
$methods = []): array {
233 $dbt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
234 $caller = $dbt[1][
'function'] ??
'unknown';
236 throw new InvalidArgumentException(
elgg_echo(
'Entity:Subscriptions:InvalidMethodsException', [$caller]));
242 if (!is_string($method) || $method ===
'') {
243 $dbt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
244 $caller = $dbt[1][
'function'] ??
'unknown';
246 throw new InvalidArgumentException(
elgg_echo(
'Entity:Subscriptions:InvalidMethodsException', [$caller]));
get_user($guid)
Get a user object from a GUID.
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
_elgg_services()
Get the global service provider.