1 | <?php |
||
20 | class RegistrationRepository extends \TYPO3\CMS\Extbase\Persistence\Repository |
||
21 | { |
||
22 | /** |
||
23 | * Disable the use of storage records, because the StoragePage can be set |
||
24 | * in the plugin |
||
25 | * |
||
26 | * @return void |
||
27 | */ |
||
28 | public function initializeObject() |
||
35 | 44 | ||
36 | 44 | /** |
|
37 | 44 | * Returns all registrations, where the confirmation date is less than the |
|
38 | 44 | * given date |
|
39 | * |
||
40 | * @param \Datetime $dateNow Date |
||
41 | * |
||
42 | * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface|array |
||
43 | */ |
||
44 | public function findExpiredRegistrations($dateNow) |
||
53 | 6 | ||
54 | 6 | /** |
|
55 | * Returns all registrations for the given event with the given constraints |
||
56 | * Constraints are combined with a logical AND |
||
57 | * |
||
58 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Event $event Event |
||
59 | * @param array $findConstraints FindConstraints |
||
60 | * |
||
61 | * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
||
62 | */ |
||
63 | public function findNotificationRegistrations($event, $findConstraints) |
||
99 | |||
100 | 12 | /** |
|
101 | * Returns registrations for the given UserRegistrationDemand demand |
||
102 | * |
||
103 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Dto\UserRegistrationDemand $demand |
||
104 | * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
||
105 | */ |
||
106 | public function findRegistrationsByUserRegistrationDemand($demand) |
||
120 | |||
121 | /** |
||
122 | * Returns all registrations for the given event and where the waitlist flag is as given |
||
123 | * |
||
124 | * @param Event $event |
||
125 | 12 | * @param bool $waitlist |
|
126 | * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
||
127 | 12 | */ |
|
128 | 2 | public function findByEventAndWaitlist($event, $waitlist = false) |
|
142 | |||
143 | /** |
||
144 | * Sets the displayMode constraint to the given constraints array |
||
145 | * |
||
146 | * @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query Query |
||
147 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Dto\UserRegistrationDemand $demand |
||
148 | 10 | * @param array $constraints Constraints |
|
149 | * |
||
150 | 10 | * @return void |
|
151 | 10 | */ |
|
152 | 2 | protected function setDisplayModeConstraint($query, $demand, &$constraints) |
|
164 | |||
165 | /** |
||
166 | * Sets the storagePage constraint to the given constraints array |
||
167 | * |
||
168 | * @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query Query |
||
169 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Dto\UserRegistrationDemand $demand |
||
170 | 10 | * @param array $constraints Constraints |
|
171 | * |
||
172 | 10 | * @return void |
|
173 | 10 | */ |
|
174 | 10 | protected function setStoragePageConstraint($query, $demand, &$constraints) |
|
181 | |||
182 | /** |
||
183 | * Sets the user constraint to the given constraints array |
||
184 | * |
||
185 | * @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query Query |
||
186 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Dto\UserRegistrationDemand $demand |
||
187 | 10 | * @param array $constraints Constraints |
|
188 | * |
||
189 | 10 | * @return void |
|
190 | 10 | */ |
|
191 | 10 | protected function setUserConstraint($query, $demand, &$constraints) |
|
197 | |||
198 | /** |
||
199 | * Sets the ordering to the given query for the given demand |
||
200 | * |
||
201 | * @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query Query |
||
202 | 10 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Dto\UserRegistrationDemand $demand |
|
203 | * |
||
204 | 10 | * @return void |
|
205 | 10 | */ |
|
206 | 4 | protected function setOrderingsFromDemand($query, $demand) |
|
216 | } |
||
217 |