Você não pode selecionar mais de 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
|
- <?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();
- }
- }
|