filtre company

This commit is contained in:
2019-08-07 17:05:01 +02:00
parent e8c9052e35
commit c801856bfc
@@ -57,8 +57,6 @@ class CompanyRepository extends AbstractRepository
{
$qb = $this
->createQueryBuilder('c')
//->from('AppBundle:TerritoryAd', 'a')
//->where('c.id = IDENTITY(a.territory)')
->andWhere('c.type = :type')
->setParameter(':type', "TERRITORY");
@@ -79,13 +77,16 @@ class CompanyRepository extends AbstractRepository
public function search($term, $order = 'asc', $limit = 10, $offset = 1,
$isEmphasis)
{
// return $this->paginate($this->getCompaniesWithBrandname(), $limit, $offset);
$qb = $this
->createQueryBuilder('c')
->select('c')
->leftJoin('c.ads', 'a', 'WITH', 'a.status =:status')
->setParameter(':status', "PUBLISHED")
->where("c.type = 'COMPANY'")
->orderBy('c.id', $order)
;
->andWhere('c.presentationVideo IS NOT NULL')
->orderBy('c.cTime', 'DESC');
if ($isEmphasis) {
$qb