the browser-facing portion of osu!
at master 24 lines 660 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\ProfileBanner; 9 10class ProfileBannerTransformer extends TransformerAbstract 11{ 12 public function transform(ProfileBanner $banner) 13 { 14 $image = $banner->image(); 15 $image2x = $image === null ? null : retinaify($image); 16 17 return [ 18 'id' => $banner->getKey(), 19 'tournament_id' => $banner->tournament_id, 20 'image' => $image, 21 'image@2x' => $image2x, 22 ]; 23 } 24}