|
- <?php
-
- namespace Lc\ShopBundle\Repository;
-
- use Doctrine\ORM\EntityRepository;
- use Lc\ShopBundle\Context\MerchantInterface;
-
- /**
- * @method MerchantInterface|null find($id, $lockMode = null, $lockVersion = null)
- * @method MerchantInterface|null findOneBy(array $criteria, array $orderBy = null)
- * @method MerchantInterface[] findAll()
- * @method MerchantInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
- */
- class MerchantRepository extends EntityRepository
- {
- public function findAllWithConfigs()
- {
- $qb = $this->createQueryBuilder('hub');
- $qb->innerJoin('hub.merchantConfigs', 'merchant_configs');
- return $qb->getQuery()->getResult();
- }
-
- public function getInterfaceClass()
- {
- return MerchantInterface::class;
- }
- }
|