Piwik\Notification\Manager::cancel PHP Method

cancel() public static method

Removes a posted notification by ID.
public static cancel ( string $id )
$id string The notification ID, see {@link notify()}.
    public static function cancel($id)
    {
        self::checkId($id);
        self::removeNotification($id);
    }

Usage Example

Esempio n. 1
0
 public function markNotificationAsRead()
 {
     $notificationId = Common::getRequestVar('notificationId');
     NotificationManager::cancel($notificationId);
 }