Allow to filter for languages in conrad attachments

This commit is contained in:
Jan Böhmer 2026-01-31 21:49:43 +01:00
parent fa04fface3
commit 6d224a4a9f
2 changed files with 22 additions and 0 deletions

View file

@ -200,6 +200,11 @@ readonly class ConradProvider implements InfoProviderInterface
{
$files = [];
foreach ($productMedia['manuals'] as $manual) {
//Filter out unwanted languages
if (!empty($this->settings->attachmentLanguageFilter) && !in_array($manual['language'], $this->settings->attachmentLanguageFilter, true)) {
continue;
}
$files[] = new FileDTO($manual['fullUrl'], $manual['title'] . ' (' . $manual['language'] . ')');
}