getId()); return $this->apiLegacyRequestService->getContent($url); } /** * Retoune l'URL de l'image, à la bonne taille, contenu dans la File * @param File $file * @param string $size * @param bool $relativePath * @return string */ public function getImageUrl(File $file, string $size, bool $relativePath): string{ $url = sprintf('api/files/%s/download/%s?relativePath=1', $file->getId(), $size); return UrlBuilder::concat($this->legacyBaseUrl, [$this->apiLegacyRequestService->getContent($url)], []); } /** * @param File $file * @return bool */ public function support(File $file): bool { return $file->getHost() === FileHostEnum::API1; } }