You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
-
- namespace Lc\CaracoleBundle\Repository;
-
-
- use Lc\SovBundle\Doctrine\EntityInterface;
-
- trait TreeRepositoryQueryTrait
- {
- public function filterIsParent(){
- return $this->andWhere('.parent is NULL');
- }
-
- public function filterIsChildren(){
- return $this->andWhere('.parent is NOT NULL');
- }
-
- public function filterByParent(EntityInterface $parent){
- return $this->andWhere('.parent = :parent')->setParameter('parent', $parent);
- }
-
- }
|