1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +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:
Nicofuma
2014-04-28 14:00:27 +02:00
committed by Tristan Darricau
parent 58d1d37c16
commit be0d4e20d4
55 changed files with 1229 additions and 609 deletions

View File

@@ -52,7 +52,15 @@ class phpbb_mock_container_builder implements ContainerInterface
{
if ($this->has($id))
{
return $this->services[$id];
$service = $this->services[$id];
if (is_array($service) && is_callable($service[0]))
{
return call_user_func_array($service[0], $service[1]);
}
else
{
return $service;
}
}
throw new Exception('Could not find service: ' . $id);

View File

@@ -32,19 +32,18 @@ class phpbb_mock_notification_manager
);
}
public function mark_notifications_read()
public function mark_notifications()
{
}
public function mark_notifications_read_by_parent()
public function mark_notifications_by_parent()
{
}
public function mark_notifications_read_by_id()
public function mark_notifications_by_id()
{
}
public function add_notifications()
{
return array();

View File

@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
class phpbb_mock_notification_type_post extends \phpbb\notification\type\post
{
public function __construct($user_loader, $db, $cache, $user, $auth, $config, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
public function __construct($user_loader, $db, $cache, $user, $auth, $config, $phpbb_root_path, $php_ext, $notification_types_table, $user_notifications_table)
{
$this->user_loader = $user_loader;
$this->db = $db;
@@ -34,7 +34,6 @@ class phpbb_mock_notification_type_post extends \phpbb\notification\type\post
$this->php_ext = $php_ext;
$this->notification_types_table = $notification_types_table;
$this->notifications_table = $notifications_table;
$this->user_notifications_table = $user_notifications_table;
$this->user_notifications_table = $user_notifications_table;
}
}