[ Index ]

PHP Cross Reference of phpBB-3.3.12-deutsch

title

Body

[close]

/phpbb/notification/ -> manager.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 1030 lines (34 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

manager:: (31 methods):
  __construct()
  load_notifications()
  mark_notifications_read()
  mark_notifications()
  mark_notifications_read_by_parent()
  mark_notifications_by_parent()
  mark_notifications_by_id()
  add_notifications()
  add_notifications_for_users()
  update_notifications()
  update_notification()
  delete_notifications()
  get_subscription_types()
  get_subscription_methods()
  get_subscription_methods_instances()
  get_available_subscription_methods()
  get_user_notifications()
  get_global_subscriptions()
  add_subscription()
  delete_subscription()
  disable_notifications()
  purge_notifications()
  enable_notifications()
  prune_notifications()
  get_default_methods()
  get_item_type_class()
  get_method_class()
  load_object()
  get_notification_type_id()
  get_notification_type_ids()
  get_notified_users()


Class: manager  - X-Ref

Notifications service class

__construct($notification_types, $notification_methods, ContainerInterface $phpbb_container, \phpbb\user_loader $user_loader, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\db\driver\driver_interface $db, \phpbb\cache\service $cache, \phpbb\language\language $language, \phpbb\user $user, $notification_types_table, $user_notifications_table)   X-Ref
Notification Constructor

return: \phpbb\notification\manager
param: array $notification_types
param: array $notification_methods
param: ContainerInterface $phpbb_container
param: \phpbb\user_loader $user_loader
param: \phpbb\event\dispatcher_interface $phpbb_dispatcher
param: \phpbb\db\driver\driver_interface $db
param: \phpbb\cache\service $cache
param: \phpbb\language\language $language
param: \phpbb\user $user
param: string $notification_types_table
param: string $user_notifications_table

load_notifications($method_name, array $options = array()   X-Ref
Load the user's notifications for a given method

return: array Array of information based on the request with keys:
param: string $method_name
param: array $options Optional options to control what notifications are loaded

mark_notifications_read($notification_type_name, $item_id, $user_id, $time = false)   X-Ref
Mark notifications read or unread for all available methods

param: bool|string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types). False to mark read for all item types
param: bool|int|array $item_id Item id or array of item ids. False to mark read for all item ids
param: bool|int|array $user_id User id or array of user ids. False to mark read for all user ids
param: bool|int $time Time at which to mark all notifications prior to as read. False to mark all as read. (Default: False)

mark_notifications($notification_type_name, $item_id, $user_id, $time = false, $mark_read = true)   X-Ref
Mark notifications read or unread for all available methods

param: bool|string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types). False to mark read for all item types
param: bool|int|array $item_id Item id or array of item ids. False to mark read for all item ids
param: bool|int|array $user_id User id or array of user ids. False to mark read for all user ids
param: bool|int $time Time at which to mark all notifications prior to as read. False to mark all as read. (Default: False)
param: bool $mark_read Define if the notification as to be set to True or False. (Default: True)

mark_notifications_read_by_parent($notification_type_name, $item_parent_id, $user_id, $time = false)   X-Ref
Mark notifications read or unread from a parent identifier for all available methods

param: string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
param: bool|int|array $item_parent_id Item parent id or array of item parent ids. False to mark read for all item parent ids
param: bool|int|array $user_id User id or array of user ids. False to mark read for all user ids
param: bool|int $time Time at which to mark all notifications prior to as read. False to mark all as read. (Default: False)

mark_notifications_by_parent($notification_type_name, $item_parent_id, $user_id, $time = false, $mark_read = true)   X-Ref
Mark notifications read or unread from a parent identifier for all available methods

param: string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
param: bool|int|array $item_parent_id Item parent id or array of item parent ids. False to mark read for all item parent ids
param: bool|int|array $user_id User id or array of user ids. False to mark read for all user ids
param: bool|int $time Time at which to mark all notifications prior to as read. False to mark all as read. (Default: False)
param: bool $mark_read Define if the notification as to be set to True or False. (Default: True)

mark_notifications_by_id($method_name, $notification_id, $time = false, $mark_read = true)   X-Ref
Mark notifications read or unread for a given method

param: string $method_name
param: int|array $notification_id Notification id or array of notification ids.
param: bool|int $time Time at which to mark all notifications prior to as read. False to mark all as read. (Default: False)
param: bool $mark_read Define if the notification as to be set to True or False. (Default: True)

add_notifications($notification_type_name, $data, array $options = array()   X-Ref
Add a notification

return: array Information about what users were notified and how they were notified
param: string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
param: array $data Data specific for this type that will be inserted
param: array $options Optional options to control what notifications are loaded

add_notifications_for_users($notification_type_name, $data, $notify_users)   X-Ref
Add a notification for specific users

param: string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
param: array $data Data specific for this type that will be inserted
param: array $notify_users User list to notify

update_notifications($notification_type_name, array $data, array $options = array()   X-Ref
Update notification

param: string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types)
param: array $data Data specific for this type that will be updated
param: array $options

update_notification(\phpbb\notification\type\type_interface $notification, array $data, array $options = array()   X-Ref
Update a notification

param: \phpbb\notification\type\type_interface $notification The notification
param: array $data Data specific for this type that will be updated
param: array $options

delete_notifications($notification_type_name, $item_id, $parent_id = false, $user_id = false)   X-Ref
Delete a notification

param: string|array $notification_type_name Type identifier or array of item types (only acceptable if the $item_id is identical for the specified types)
param: int|array $item_id Identifier within the type (or array of ids)
param: mixed $parent_id Parent identifier within the type (or array of ids), used in combination with item_id if specified (Default: false; not checked)
param: mixed $user_id User id (Default: false; not checked)

get_subscription_types()   X-Ref
Get all of the subscription types

return: array Array of item types

get_subscription_methods()   X-Ref
Get all of the subscription methods

return: array Array of methods

get_subscription_methods_instances()   X-Ref
Get all of the subscription methods

return: array Array of method's instances

get_available_subscription_methods()   X-Ref
Get all of the available subscription methods

return: array Array of method's instances

get_user_notifications($user_id)   X-Ref
Get user's notification data

return: array User's notification
param: int $user_id The user_id of the user to get the notifications for

get_global_subscriptions($user_id = false)   X-Ref
Get global subscriptions (item_id = 0)

return: array Subscriptions
param: bool|int $user_id The user_id to add the subscription for (bool false for current user)

add_subscription($item_type, $item_id = 0, $method = null, $user_id = false)   X-Ref
Add a subscription

param: string $item_type Type identifier of the subscription
param: int $item_id The id of the item
param: string $method The method of the notification e.g. 'board', 'email', or 'jabber'
param: bool|int $user_id The user_id to add the subscription for (bool false for current user)

delete_subscription($item_type, $item_id = 0, $method = null, $user_id = false)   X-Ref
Delete a subscription

param: string $item_type Type identifier of the subscription
param: int $item_id The id of the item
param: string $method The method of the notification e.g. 'board', 'email', or 'jabber'
param: bool|int $user_id The user_id to add the subscription for (bool false for current user)

disable_notifications($notification_type_name)   X-Ref
Disable all notifications of a certain type

This should be called when an extension which has notification types
is disabled so that all those notifications are hidden and do not
cause errors

param: string $notification_type_name Type identifier of the subscription

purge_notifications($notification_type_name)   X-Ref
Purge all notifications of a certain type

This should be called when an extension which has notification types
is purged so that all those notifications are removed

param: string $notification_type_name Type identifier of the subscription

enable_notifications($notification_type_name)   X-Ref
Enable all notifications of a certain type

This should be called when an extension which has notification types
that was disabled is re-enabled so that all those notifications that
were hidden are shown again

param: string $notification_type_name Type identifier of the subscription

prune_notifications($timestamp, $only_read = true)   X-Ref
Delete all notifications older than a certain time

param: int $timestamp Unix timestamp to delete all notifications that were created before
param: bool $only_read True (default) to only prune read notifications

get_default_methods()   X-Ref
Helper to get the list of methods enabled by default

return: method\method_interface[]

get_item_type_class($notification_type_name, $data = array()   X-Ref
Helper to get the notifications item type class and set it up

return: type\type_interface
param: string $notification_type_name
param: array  $data

get_method_class($method_name)   X-Ref
Helper to get the notifications method class and set it up

return: method\method_interface
param: string $method_name

load_object($object_name)   X-Ref
Helper to load objects (notification types/methods)

return: method\method_interface|type\type_interface
param: string $object_name

get_notification_type_id($notification_type_name)   X-Ref
Get the notification type id from the name

return: int the notification_type_id
param: string $notification_type_name The name

get_notification_type_ids($notification_type_names)   X-Ref
Get notification type ids (as an array)

return: array Array of integers
param: string|array $notification_type_names Notification type names

get_notified_users($notification_type_name, array $options)   X-Ref
Find the users which are already notified

return: array The list of the notified users
param: bool|string|array $notification_type_name Type identifier or array of item types (only acceptable if the $data is identical for the specified types). False to retrieve all item types
param: array $options



Generated: Sun Jun 23 12:25:44 2024 Cross-referenced by PHPXref 0.7.1