if (strpos($size, 'x'
) === false
) { $size =
sprintf('%sx%s',
$size,
$size);
} $projectDir =
$this->container->
getParameter('shopware.app.rootDir'
);
if (!\
is_string($projectDir)) { throw new RuntimeException('Parameter shopware.app.rootDir has to be an string'
);
} $thumbnailDir =
$projectDir . 'media' . DIRECTORY_SEPARATOR .
strtolower($media['type'
]) . DIRECTORY_SEPARATOR . 'thumbnail' . DIRECTORY_SEPARATOR;
$path =
$thumbnailDir .
$this->
removeSpecialCharacters($media['name'
]) . '_' .
$size . '.' .
$media['extension'
];
$path =
str_replace(Shopware()->
DocPath(), '',
$path);
if (DIRECTORY_SEPARATOR !== '/'
) { $path =
str_replace(DIRECTORY_SEPARATOR, '/',
$path);
} $thumbnails[(string) $size] =
$path;
} return $thumbnails;
}