diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2013-10-28 01:58:46 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2013-10-28 01:58:46 +0400 |
commit | aa1ff54d9b545db98f7656e4d58f15ea251f630f (patch) | |
tree | 7aaa801783e413472ebd8e502c4a106d431ccd0a /core/Notification | |
parent | 38a6c592ba78049b7bfe07d1f5a12ee33114ac6e (diff) |
refs #4179 do not expose the whole class for plugin developers, only the notify method
Diffstat (limited to 'core/Notification')
-rw-r--r-- | core/Notification/Manager.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/Notification/Manager.php b/core/Notification/Manager.php index f35ba0ee93..51681f0766 100644 --- a/core/Notification/Manager.php +++ b/core/Notification/Manager.php @@ -16,7 +16,6 @@ use Piwik\Session\SessionNamespace; /** * @package Piwik * @subpackage Notification - * @api */ class Manager { @@ -29,6 +28,8 @@ class Manager * @param string $id A unique identifier for this notification. Id must be a string and may contain only * word characters (AlNum + underscore) * @param Notification $notification + * + * @api */ public static function notify($id, Notification $notification) { @@ -38,6 +39,10 @@ class Manager $session->$id = $notification; } + /** + * Determine all notifications that needs to be displayed. They are sorted by priority. Highest priorities first. + * @return \ArrayObject + */ public static function getAllNotificationsToDisplay() { $session = static::getSession(); @@ -54,6 +59,10 @@ class Manager return $notifications; } + /** + * Cancels all previously registered non-persist notification. Call this method after the notifications have been + * displayed to make sure all non-persistent notifications won't be displayed multiple times. + */ public static function cancelAllNonPersistent() { $session = static::getSession(); |