Browse Source

ReductionCartRepositoryQuery : ajout filterByType()

develop
Guillaume Bourgeois 8 months ago
parent
commit
43616b52a4
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      Repository/Reduction/ReductionCartRepositoryQuery.php

+ 7
- 0
Repository/Reduction/ReductionCartRepositoryQuery.php View File

@@ -29,4 +29,11 @@ class ReductionCartRepositoryQuery extends AbstractRepositoryQuery
->andWhere(':user MEMBER OF .users')
->setParameter('user', $user);
}

public function filterByType(string $type, string $operator = '=')
{
return $this
->andWhere('.type '.$operator.' :type')
->setParameter('type', $type);
}
}

Loading…
Cancel
Save