finderOtherMediaWithFileName example


    public function __construct(private readonly EntityRepository $mediaRepository)
    {
    }

    public function provide(
        string $preferredFileName,
        string $fileExtension,
        ?string $mediaId,
        Context $context
    ): string {
        $mediaWithRelatedFilename = $this->finderOtherMediaWithFileName(
            $preferredFileName,
            $fileExtension,
            $mediaId,
            $context
        );

        return $this->getPossibleFileName($mediaWithRelatedFilename$preferredFileName);
    }

    abstract protected function getNextFileName(
        string $originalFileName,
        
Home | Imprint | This part of the site doesn't use cookies.