mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 19:24:01 +02:00
[ticket/11444] Moving the in-board notifications to a method class
Currently the in-board method for the notifications is hardcoded and cannot be disabled. This method should be in his own class extending `phpbb\notification\method\method_interface`. It also add the possibility, for each method, to be enabled by default (ie: no entry in the DB => notification enabled). https://tracker.phpbb.com/browse/PHPBB3-11444 https://tracker.phpbb.com/browse/PHPBB3-11967 PHPBB3-11444
This commit is contained in:
committed by
Tristan Darricau
parent
58d1d37c16
commit
be0d4e20d4
@@ -93,6 +93,36 @@ abstract class base implements \phpbb\notification\method\method_interface
|
||||
$this->notification_manager = $notification_manager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the method enable by default?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_enabled_by_default()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_notified_users($notification_type_id, array $options)
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function load_notifications(array $options = array())
|
||||
{
|
||||
return array(
|
||||
'notifications' => array(),
|
||||
'unread_count' => 0,
|
||||
'total_count' => 0,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a notification to the queue
|
||||
*
|
||||
@@ -103,6 +133,55 @@ abstract class base implements \phpbb\notification\method\method_interface
|
||||
$this->queue[] = $notification;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function update_notification($notification, array $data, array $options)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc
|
||||
*/
|
||||
public function mark_notifications($notification_type_id, $item_id, $user_id, $time = false, $mark_read = true)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function mark_notifications_by_parent($notification_type_id, $item_parent_id, $user_id, $time = false, $mark_read = true)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function mark_notifications_by_id($notification_id, $time = false, $mark_read = true)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete_notifications($notification_type_id, $item_id, $parent_id = false, $user_id = false)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function prune_notifications($timestamp, $only_read = true)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function purge_notifications($notification_type_id)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Empty the queue
|
||||
*/
|
||||
|
Reference in New Issue
Block a user