Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use CoreShop\Component\Pimcore\BatchProcessing\BatchListing;
use CoreShop\Component\Resource\Repository\PimcoreRepositoryInterface;
use CoreShop\Component\Store\Model\StoreInterface;
use CoreShop2VueStorefrontBundle\Repository\LanguageAwareRepositoryInterface;
use CoreShop2VueStorefrontBundle\Repository\StoreAwareRepositoryInterface;
use Pimcore\Model\Listing\AbstractListing;

Expand Down Expand Up @@ -59,6 +60,9 @@ private function getList(): AbstractListing
if ($this->repository instanceof StoreAwareRepositoryInterface && $this->concreteStore instanceof StoreInterface) {
$this->repository->addStoreCondition($this->list, $this->concreteStore);
}
if($this->repository instanceof LanguageAwareRepositoryInterface && $this->language) {
$this->repository->addLanguageCondition($this->list, $this->language);
}
}

return $this->list;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php


namespace CoreShop2VueStorefrontBundle\Repository;

use CoreShop\Component\Resource\Repository\PimcoreRepositoryInterface;
use Pimcore\Model\Listing\AbstractListing;

interface LanguageAwareRepositoryInterface extends PimcoreRepositoryInterface
{

public function addLanguageCondition(AbstractListing $listing, string $language);

}