Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- <?php
-
- namespace Lc\CaracoleBundle\Repository\Address;
-
- use Lc\CaracoleBundle\Repository\MerchantStoreTrait;
- use Lc\SovBundle\Model\User\UserInterface;
- use Lc\SovBundle\Repository\AbstractStore;
- use Lc\SovBundle\Repository\RepositoryQueryInterface;
-
- class AddressStore extends AbstractStore
- {
- use MerchantStoreTrait;
-
- protected AddressRepositoryQuery $query;
-
- public function __construct(AddressRepositoryQuery $query)
- {
- $this->query = $query;
- }
- public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
- {
- $query->orderBy('id');
- return $query;
- }
-
- public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
- {
- $query->filterIsOnlineAndOffline();
- return $query;
- }
-
- public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
- {
- return $query;
- }
-
- public function getByUser(UserInterface $user)
- {
- $query = $this->createDefaultQuery();
- $query->filterByUser($user);
- return $query->find();
- }
-
- }
|