class NotificationSyncer
The Notification Syncer commits notification blueprints to the database, and sends them via email depending on user preference. Where a blueprint represents a single notification, the syncer associates it with a particular user(s) and makes it available in their inbox.
Properties
Methods
Sync a notification so that it is visible to the specified users, and not visible to anyone else. If it is being made visible for the first time, attempt to send the user an email.
Limit notifications to one per user for the entire duration of the given callback.
Adds a notification driver to the list.
Details
at
line 59
void
sync(BlueprintInterface $blueprint, array $users)
Sync a notification so that it is visible to the specified users, and not visible to anyone else. If it is being made visible for the first time, attempt to send the user an email.
at
line 120
void
delete(BlueprintInterface $blueprint)
Delete a notification for all users.
at
line 131
void
restore(BlueprintInterface $blueprint)
Restore a notification for all users.
at
line 143
void
onePerUser(callable $callback)
Limit notifications to one per user for the entire duration of the given callback.
at
line 159
protected
setDeleted(array $ids, bool $isDeleted)
Set the deleted status of a list of notification records.
at
line 170
static
addNotificationDriver(string $driverName, NotificationDriverInterface $driver)
Adds a notification driver to the list.