PHP Класс common\services\NotificationService

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$notifiedUsers

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

Метод Описание
batchNotify ( $type, User $fromUser, $users, Post $post, PostComment $comment = null ) : boolean 批量处理通知
findUserActionNotify ( UserMeta $meta ) : null | static 查找用户的动作通知
newActionNotify ( $type, $fromUserId, $toUserId, Post $post, PostComment $comment = null ) 点赞和其他动作通知
newPostNotify ( User $fromUser, Post $post, [] $users ) 内容@用户会有通知
newReplyNotify ( User $fromUser, Topic $topic, PostComment $comment, $atUsers ) 评论和@用户会有通知

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

batchNotify() публичный Метод

批量处理通知
public batchNotify ( $type, User $fromUser, $users, Post $post, PostComment $comment = null ) : boolean
$type
$fromUser common\models\User
$users
$post common\models\Post
$comment common\models\PostComment
Результат boolean

findUserActionNotify() публичный Метод

查找用户的动作通知
public findUserActionNotify ( UserMeta $meta ) : null | static
$meta frontend\modules\user\models\UserMeta
Результат null | static

newActionNotify() публичный Метод

点赞和其他动作通知
public newActionNotify ( $type, $fromUserId, $toUserId, Post $post, PostComment $comment = null )
$type
$fromUserId
$toUserId
$post common\models\Post
$comment common\models\PostComment

newPostNotify() публичный Метод

内容@用户会有通知
public newPostNotify ( User $fromUser, Post $post, [] $users )
$fromUser common\models\User
$post common\models\Post
$users []

newReplyNotify() публичный Метод

评论和@用户会有通知
public newReplyNotify ( User $fromUser, Topic $topic, PostComment $comment, $atUsers )
$fromUser common\models\User
$topic frontend\modules\topic\models\Topic
$comment common\models\PostComment

Описание свойств

$notifiedUsers публичное свойство

public $notifiedUsers