getPreviewImage example

$data = parent::getList(null, null, $sort$filter$wholeParams);

        $shop = $this->getManager()->find(Shop::class$wholeParams['shopId']);

        foreach ($data['data'] as &$theme) {
            $instance = $this->getRepository()->find($theme['id']);
            if (!$instance instanceof Template) {
                continue;
            }

            $theme['screen'] = $this->container->get(Util::class)->getPreviewImage($instance);

            $theme['path'] = $this->container->get(PathResolver::class)->getDirectory($instance);

            $theme = $this->get(Service::class)->translateTheme($instance$theme);

            if ($shop instanceof Shop && $shop->getTemplate() instanceof Template) {
                $theme['enabled'] = $theme['id'] === $shop->getTemplate()->getId();
            }
        }

        return $this->get('events')->filter('Shopware_Theme_Listing_Loaded', $data[
            
Home | Imprint | This part of the site doesn't use cookies.