選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

23 行
480B

  1. <?php
  2. namespace Lc\CaracoleBundle\Repository;
  3. use Lc\SovBundle\Doctrine\EntityInterface;
  4. trait TreeRepositoryQueryTrait
  5. {
  6. public function filterIsParent(){
  7. return $this->andWhere('.parent is NULL');
  8. }
  9. public function filterIsChildren(){
  10. return $this->andWhere('.parent is NOT NULL');
  11. }
  12. public function filterByParent(EntityInterface $parent){
  13. return $this->andWhere('.parent = :parent')->setParameter('parent', $parent);
  14. }
  15. }