Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 10 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| TerminRepository | |
0.00% |
0 / 10 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| getAllActive | |
0.00% |
0 / 10 |
|
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 | |
| 10 | /** |
| 11 | * @extends OlzRepository<Termin> |
| 12 | */ |
| 13 | class TerminRepository extends OlzRepository { |
| 14 | /** @return Collection<int, Termin>&iterable<Termin> */ |
| 15 | public function getAllActive(): Collection { |
| 16 | $is_not_archived = $this->termineUtils()->getIsNotArchivedCriteria(); |
| 17 | $criteria = Criteria::create() |
| 18 | ->where(Criteria::expr()->andX( |
| 19 | $is_not_archived, |
| 20 | Criteria::expr()->eq('on_off', 1), |
| 21 | )) |
| 22 | ->setFirstResult(0) |
| 23 | ->setMaxResults(1000000) |
| 24 | ; |
| 25 | return $this->matching($criteria); |
| 26 | } |
| 27 | } |