Свойство | Type | Description | |
---|---|---|---|
$mailer | |||
$notifications | |||
$onePerUser | boolean | Whether or not notifications are being limited to one per user. | |
$sentTo | int[] | An internal list of user IDs that notifications have been sent to. |
Méthode | Description | |
---|---|---|
__construct ( |
||
delete ( Flarum\Core\Notification\BlueprintInterface $blueprint ) : void | Delete a notification for all users. | |
onePerUser ( callable $callback ) : void | Limit notifications to one per user for the entire duration of the given callback. | |
restore ( Flarum\Core\Notification\BlueprintInterface $blueprint ) : void | Restore a notification for all users. | |
sync ( Flarum\Core\Notification\BlueprintInterface $blueprint, array $users ) : void | 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. |
Méthode | Description | |
---|---|---|
getAttributes ( Flarum\Core\Notification\BlueprintInterface $blueprint ) : array | Construct an array of attributes to be stored in a notification record in the database, given a notification blueprint. | |
mailNotifications ( Flarum\Core\Notification\MailableInterface $blueprint, array $recipients ) | Mail a notification to a list of users. | |
sendNotifications ( Flarum\Core\Notification\BlueprintInterface $blueprint, array $recipients ) | Create a notification record and send an email (depending on user preference) from a blueprint to a list of recipients. | |
setDeleted ( array $ids, boolean $isDeleted ) | Set the deleted status of a list of notification records. |
public __construct ( |
||
$notifications | ||
$mailer |
protected getAttributes ( Flarum\Core\Notification\BlueprintInterface $blueprint ) : array | ||
$blueprint | Flarum\Core\Notification\BlueprintInterface | |
Résultat | array |
protected mailNotifications ( Flarum\Core\Notification\MailableInterface $blueprint, array $recipients ) | ||
$blueprint | Flarum\Core\Notification\MailableInterface | |
$recipients | array |
public onePerUser ( callable $callback ) : void | ||
$callback | callable | |
Résultat | void |
protected sendNotifications ( Flarum\Core\Notification\BlueprintInterface $blueprint, array $recipients ) | ||
$blueprint | Flarum\Core\Notification\BlueprintInterface | |
$recipients | array |
protected setDeleted ( array $ids, boolean $isDeleted ) | ||
$ids | array | |
$isDeleted | boolean |
protected NotificationMailer,Flarum\Core\Notification $mailer | ||
Résultat |
protected NotificationRepository,Flarum\Core\Repository $notifications | ||
Résultat |
protected static bool $onePerUser | ||
Résultat | boolean |