diff options
author | PayBas <contact@paybas.com> | 2014-05-28 22:49:16 +0200 |
---|---|---|
committer | PayBas <contact@paybas.com> | 2014-06-15 10:02:09 +0200 |
commit | 693cbd247cc1d3768d56795da4a580780e6b899c (patch) | |
tree | fa7ccfc4b94284f0626176d5f51051e369fca3a7 /phpBB/phpbb/notification | |
parent | 72d29e76ced756a7b4501113a91275d8ca693af2 (diff) | |
download | forums-693cbd247cc1d3768d56795da4a580780e6b899c.tar forums-693cbd247cc1d3768d56795da4a580780e6b899c.tar.gz forums-693cbd247cc1d3768d56795da4a580780e6b899c.tar.bz2 forums-693cbd247cc1d3768d56795da4a580780e6b899c.tar.xz forums-693cbd247cc1d3768d56795da4a580780e6b899c.zip |
[ticket/12608] Add styling (CSS class) options to notifications
This will allow different notifications to have different styles
PHPBB3-12608
Diffstat (limited to 'phpBB/phpbb/notification')
-rw-r--r-- | phpBB/phpbb/notification/type/base.php | 12 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/report_pm.php | 10 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/report_post.php | 10 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/type_interface.php | 7 |
4 files changed, 39 insertions, 0 deletions
diff --git a/phpBB/phpbb/notification/type/base.php b/phpBB/phpbb/notification/type/base.php index 7e881d0c55..f5a4a9cc45 100644 --- a/phpBB/phpbb/notification/type/base.php +++ b/phpBB/phpbb/notification/type/base.php @@ -309,6 +309,8 @@ abstract class base implements \phpbb\notification\type\type_interface return array( 'NOTIFICATION_ID' => $this->notification_id, + 'STYLING' => $this->get_styling(), + 'AVATAR' => $this->get_avatar(), 'FORMATTED_TITLE' => $this->get_title(), @@ -343,6 +345,16 @@ abstract class base implements \phpbb\notification\type\type_interface } /** + * Get the styling of the notification (fall back) + * + * @return string + */ + public function get_styling() + { + return ''; + } + + /** * Get the user's avatar (fall back) * * @return string diff --git a/phpBB/phpbb/notification/type/report_pm.php b/phpBB/phpbb/notification/type/report_pm.php index 2bf13d4aa6..55bc52927f 100644 --- a/phpBB/phpbb/notification/type/report_pm.php +++ b/phpBB/phpbb/notification/type/report_pm.php @@ -31,6 +31,16 @@ class report_pm extends \phpbb\notification\type\pm } /** + * Get the styling of the notification + * + * @return string + */ + public function get_styling() + { + return 'reported'; + } + + /** * Language key used to output the text * * @var string diff --git a/phpBB/phpbb/notification/type/report_post.php b/phpBB/phpbb/notification/type/report_post.php index 1a4682eb62..c982042cb3 100644 --- a/phpBB/phpbb/notification/type/report_post.php +++ b/phpBB/phpbb/notification/type/report_post.php @@ -30,6 +30,16 @@ class report_post extends \phpbb\notification\type\post_in_queue } /** + * Get the styling of the notification + * + * @return string + */ + public function get_styling() + { + return 'reported'; + } + + /** * Language key used to output the text * * @var string diff --git a/phpBB/phpbb/notification/type/type_interface.php b/phpBB/phpbb/notification/type/type_interface.php index 5e139b797e..b1e54d9b6b 100644 --- a/phpBB/phpbb/notification/type/type_interface.php +++ b/phpBB/phpbb/notification/type/type_interface.php @@ -88,6 +88,13 @@ interface type_interface public function load_special($data, $notifications); /** + * Get the styling of the notification + * + * @return string + */ + public function get_styling(); + + /** * Get the HTML formatted title of this notification * * @return string |