@@ -28,6 +28,13 @@ class ProductCategoryRepository extends BaseRepository implements DefaultReposit | |||
->orderBy('e.position', 'ASC'); | |||
} | |||
public function findOneBySlug($slug) | |||
{ | |||
$query = $this->findByMerchantQuery() ; | |||
$query->andWhere('e.slug = :slug')->setParameter('slug',$slug) ; | |||
return $query->getQuery()->getOneOrNullResult() ; | |||
} | |||
public function findAllParents($withOffline = false) | |||
{ | |||
$query = $this->findByMerchantQuery() |
@@ -36,6 +36,13 @@ class ProductFamilyRepository extends BaseRepository implements DefaultRepositor | |||
return $query->getQuery()->getResult() ; | |||
} | |||
public function findOneBySlug($slug) | |||
{ | |||
$query = $this->findByMerchantQuery() ; | |||
$query->andWhere('e.slug = :slug')->setParameter('slug',$slug) ; | |||
return $query->getQuery()->getOneOrNullResult() ; | |||
} | |||
public function getProductFamiliesByCategory($category){ | |||
$query = $this->findByMerchantQuery() ; | |||
$query = $this->joinRelations($query) ; |