34 $prefered =
$user->getNotificationSettings();
35 $methods = array_keys(array_filter($prefered));
89 public function hasSubscriptions(
int $user_guid = 0,
string|array
$methods = []): bool {
134 public function removeSubscriptions(
int $user_guid = 0,
string|array
$methods = []): bool {
172 public function getSubscribers(
string|array
$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(
string|array
$methods = []): array {
235 if (!is_string($method) || $method ===
'') {
236 $dbt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
237 $caller = $dbt[1][
'function'] ??
'unknown';
239 throw new InvalidArgumentException(
elgg_echo(
'Entity:Subscriptions:InvalidMethodsException', [$caller]));
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
get_user(int $guid)
Elgg users Functions to manage multiple or single users in an Elgg install.
_elgg_services()
Get the global service provider.