Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 11 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
TerminRepository | |
0.00% |
0 / 11 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
getAllActive | |
0.00% |
0 / 11 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace Olz\Repository\Termine; |
4 | |
5 | use Doctrine\Common\Collections\Collection; |
6 | use Doctrine\Common\Collections\Criteria; |
7 | use Olz\Entity\Termine\Termin; |
8 | use Olz\Repository\Common\OlzRepository; |
9 | use Olz\Termine\Utils\TermineFilterUtils; |
10 | |
11 | /** |
12 | * @extends OlzRepository<Termin> |
13 | */ |
14 | class TerminRepository extends OlzRepository { |
15 | /** @return Collection<int, Termin>&iterable<Termin> */ |
16 | public function getAllActive(): Collection { |
17 | $termine_utils = TermineFilterUtils::fromEnv(); |
18 | $is_not_archived = $termine_utils->getIsNotArchivedCriteria(); |
19 | $criteria = Criteria::create() |
20 | ->where(Criteria::expr()->andX( |
21 | $is_not_archived, |
22 | Criteria::expr()->eq('on_off', 1), |
23 | )) |
24 | ->setFirstResult(0) |
25 | ->setMaxResults(1000000) |
26 | ; |
27 | return $this->matching($criteria); |
28 | } |
29 | } |