createMediaStruct example

&& $pluginConfiguration->getPreviewMedia() !== $installedConfiguration?->getPreviewMedia()
            && (
                $theme === null
                || $theme->getPreviewMedia() === null
                || basename($installedConfiguration?->getPreviewMedia() ?? '') !== $theme->getPreviewMedia()->getFileNameIncludingExtension()
            )
        ) {
            $mediaId = Uuid::randomHex();

            $path = $pluginConfiguration->getPreviewMedia();

            $mediaItem = $this->createMediaStruct($path$mediaId$themeFolderId);

            if ($mediaItem) {
                $themeData['previewMediaId'] = $mediaId;
                $media[$path] = $mediaItem;
            }
        }

        $baseConfig = $pluginConfiguration->getThemeConfig() ?? [];
        $installedBaseConfig = $installedConfiguration?->getThemeConfig() ?? [];

        $currentThemeMedia = null;
        
Home | Imprint | This part of the site doesn't use cookies.