您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

TreeRepositoryQueryTrait.php 489B

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