From 4b4ea7c5cde7c9f3684ca325c110f81eda593d67 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Sun, 9 Sep 2012 10:19:46 -0500 Subject: [ticket/11103] The service now handles all user loading itself Delete pm notifications when pms are deleted PHPBB3-11103 --- phpBB/includes/notifications/method/base.php | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/notifications/method/base.php') diff --git a/phpBB/includes/notifications/method/base.php b/phpBB/includes/notifications/method/base.php index 98c06509c6..3ed9d3f33c 100644 --- a/phpBB/includes/notifications/method/base.php +++ b/phpBB/includes/notifications/method/base.php @@ -24,11 +24,31 @@ if (!defined('IN_PHPBB')) abstract class phpbb_notifications_method_base implements phpbb_notifications_method_interface { protected $phpbb_container; + protected $service; protected $db; protected $user; protected $phpbb_root_path; protected $php_ext; + /** + * Desired notifications + * unique by (type, type_id, user_id, method) + * if multiple methods are desired, multiple rows will exist. + * + * method of "none" will over-ride any other options + * + * item_type + * item_id + * user_id + * method + * none (will never receive notifications) + * standard (listed in notifications window + * popup? + * email + * jabber + * sms? + */ + /** * Queue of messages to be sent * @@ -36,11 +56,14 @@ abstract class phpbb_notifications_method_base implements phpbb_notifications_me */ protected $queue = array(); - public function __construct(ContainerBuilder $phpbb_container, $data = array()) + public function __construct(ContainerBuilder $phpbb_container) { // phpBB Container $this->phpbb_container = $phpbb_container; + // Service + $this->service = $phpbb_container->get('notifications'); + // Some common things we're going to use $this->db = $phpbb_container->get('dbal.conn'); $this->user = $phpbb_container->get('user'); -- cgit v1.2.1