protected getAttributes ( Flarum\Core\Notification\BlueprintInterface $blueprint ) : array | ||
$blueprint | Flarum\Core\Notification\BlueprintInterface | |
return | array |
protected function getAttributes(BlueprintInterface $blueprint)
{
return ['type' => $blueprint::getType(), 'sender_id' => ($sender = $blueprint->getSender()) ? $sender->id : null, 'subject_id' => ($subject = $blueprint->getSubject()) ? $subject->id : null, 'data' => ($data = $blueprint->getData()) ? json_encode($data) : null];
}