Flarum\Api\Serializer\NotificationSerializer::getDefaultAttributes PHP Метод

getDefaultAttributes() защищенный Метод

protected getDefaultAttributes ( Notification $notification )
$notification Flarum\Core\Notification
    protected function getDefaultAttributes($notification)
    {
        if (!$notification instanceof Notification) {
            throw new InvalidArgumentException(get_class($this) . ' can only serialize instances of ' . Notification::class);
        }
        return ['id' => (int) $notification->id, 'contentType' => $notification->type, 'content' => $notification->data, 'time' => $this->formatDate($notification->time), 'isRead' => (bool) $notification->is_read];
    }