瀏覽代碼

Merge branch 'develop' of https://gitea.laclic.fr/Laclic/LcShopBundle into develop

feature/export_comptable
Fab 4 年之前
父節點
當前提交
f08e822b4f
共有 1 個檔案被更改,包括 14 行新增0 行删除
  1. +14
    -0
      ShopBundle/Repository/ProductFamilyRepository.php

+ 14
- 0
ShopBundle/Repository/ProductFamilyRepository.php 查看文件

@@ -79,5 +79,19 @@ class ProductFamilyRepository extends BaseRepository implements DefaultRepositor
return $query->getQuery()->getResult() ;
}

public function findByTerms($terms, $maxResults = false)
{
$query = $this->findByMerchantQuery() ;
$query->andWhere('e.status = 1');
$query->andWhere('e.title LIKE :terms');
$query->setParameter(':terms', '%'.$terms.'%') ;

if($maxResults) {
$query->setMaxResults($maxResults) ;
}

return $query->getQuery()->getResult() ;
}


}

Loading…
取消
儲存