the browser-facing portion of osu!
at master 31 lines 728 B view raw
1<?php 2 3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 4// See the LICENCE file in the repository root for full licence text. 5 6namespace App\Transformers; 7 8use App\Models\UserContestEntry; 9 10class SeasonalBackgroundTransformer extends TransformerAbstract 11{ 12 protected array $availableIncludes = [ 13 'user', 14 ]; 15 16 protected array $defaultIncludes = [ 17 'user', 18 ]; 19 20 public function transform(UserContestEntry $entry) 21 { 22 return [ 23 'url' => $entry->seasonalUrl(), 24 ]; 25 } 26 27 public function includeUser(UserContestEntry $entry) 28 { 29 return $this->item($entry->user, new UserCompactTransformer()); 30 } 31}