Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- <?php
-
- namespace Lc\CaracoleBundle\Repository\Product;
-
- use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
- use Lc\CaracoleBundle\Repository\SectionStoreTrait;
- use Lc\CaracoleBundle\Repository\AbstractStore;
- use Lc\SovBundle\Repository\RepositoryQueryInterface;
-
- class ProductFamilySectionPropertyStore extends AbstractStore
- {
- use SectionStoreTrait;
-
- protected ProductFamilySectionPropertyRepositoryQuery $query;
-
- public function __construct(ProductFamilySectionPropertyRepositoryQuery $query)
- {
- $this->query = $query;
- }
-
- public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
- {
- return $query;
- }
-
- public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
- {
- $this->addFilterBySectionRequired($query);
- return $query;
- }
-
- public function relationsDefault($query): RepositoryQueryInterface
- {
- return $query;
- }
-
- public function getOneByProductFamily(ProductFamilyInterface $productFamily, $query = null)
- {
- $query = $this->createDefaultQuery($query);
- $query->filterByProductFamily($productFamily);
- return $query->findOne();
- }
- }
|