|
- <?php
-
- namespace Lc\ShopBundle\Repository;
-
- use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepositoryInterface;
- use Doctrine\ORM\EntityManager;
- use Doctrine\ORM\EntityRepository;
- use Doctrine\ORM\QueryBuilder;
- use Symfony\Bridge\Doctrine\ManagerRegistry;
- use Symfony\Component\Form\Exception\LogicException;
-
- class BaseRepository extends EntityRepository implements ServiceEntityRepositoryInterface
- {
- /**
- * @param string $entityClass The class name of the entity this repository manages
- */
- public function __construct(EntityManager $entityManager, $entityClass)
- {
-
-
- parent::__construct($entityManager, $entityManager->getClassMetadata($entityClass));
- }
-
- public function findAllOfflineAndDelete()
- {
-
- return $this->createQueryBuilder('e')
- ->andWhere('e.status < = 0')
- ->orderBy('e.status', "DESC")
- ->getQuery()
- ->getResult();
-
- }
-
-
- }
|