|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
$query = $this->createQueryBuilder('e'); |
|
|
$query = $this->createQueryBuilder('e'); |
|
|
$query->andWhere('e.parent = :idParentCategory'); |
|
|
$query->andWhere('e.parent = :idParentCategory'); |
|
|
|
|
|
$query->setParameter('idParentCategory', $parentCategory->getId()); |
|
|
|
|
|
|
|
|
if ($withOffline) $query->andWhere('e.status >= 0'); |
|
|
if ($withOffline) $query->andWhere('e.status >= 0'); |
|
|
else $query->andWhere('e.status = 1'); |
|
|
else $query->andWhere('e.status = 1'); |
|
|
|
|
|
|
|
|
$query->andWhere('pf.status = 1') ; |
|
|
$query->andWhere('pf.status = 1') ; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$query->setParameter('idParentCategory', $parentCategory->getId()); |
|
|
|
|
|
|
|
|
$query->addOrderBy('e.position', 'ASC') ; |
|
|
|
|
|
|
|
|
return $query->getQuery()->getResult(); |
|
|
return $query->getQuery()->getResult(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |