PHP Класс Piwik\Notification\Manager

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
cancel ( string $id ) Removes a posted notification by ID.
cancelAllNonPersistent ( ) Removes all temporary notifications.
getAllNotificationsToDisplay ( ) : ArrayObject Determine all notifications that needs to be displayed. They are sorted by priority. Highest priorities first.
notify ( string $id, Notification $notification ) Posts a notification that will be shown in Piwik's status bar. If a notification with the same ID has been posted and has not been closed/removed, it will be replaced with $notification.

Приватные методы

Метод Описание
addNotification ( $id, Notification $notification )
checkId ( $id )
getAllNotifications ( )
getSession ( ) : Piwik\Session\SessionNamespace
isSessionEnabled ( )
removeNotification ( $id )
removeOldestNotificationsIfThereAreTooMany ( )
saveNotificationAcrossUiRequestsIfNeeded ( $id, Notification $notification )

Описание методов

cancel() публичный статический Метод

Removes a posted notification by ID.
public static cancel ( string $id )
$id string The notification ID, see {@link notify()}.

cancelAllNonPersistent() публичный статический Метод

Call this method after the notifications have been displayed to make sure temporary notifications won't be displayed twice.
public static cancelAllNonPersistent ( )

getAllNotificationsToDisplay() публичный статический Метод

Determine all notifications that needs to be displayed. They are sorted by priority. Highest priorities first.
public static getAllNotificationsToDisplay ( ) : ArrayObject
Результат ArrayObject

notify() публичный статический Метод

Posts a notification that will be shown in Piwik's status bar. If a notification with the same ID has been posted and has not been closed/removed, it will be replaced with $notification.
public static notify ( string $id, Notification $notification )
$id string A unique identifier for this notification. The ID must be a valid HTML element ID. It can only contain alphanumeric characters (underscores can be used).
$notification Piwik\Notification The notification to post.