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 | * Override the default findByUid function |
|
38 | 44 | * |
|
39 | * Note: This is required in order to make Extbase return the registration object with the language |
||
40 | * overlay of all sub-properties overlayed correctly. If this function is not used, findByUid will |
||
41 | * return the registration object in the expected language, but the included event object will be |
||
42 | * in the default language. |
||
43 | * |
||
44 | * This is no bug in Extbase, but a special behavior in sf_event_mgt, since the UID of the event in |
||
45 | * the default language is saved to the registration (to make event limitations work correctly) |
||
46 | * |
||
47 | * @param int $uid |
||
48 | 6 | * @return object |
|
49 | */ |
||
50 | 6 | public function findByUid($uid) |
|
55 | |||
56 | /** |
||
57 | * Returns all registrations, where the confirmation date is less than the |
||
58 | * given date |
||
59 | * |
||
60 | * @param \Datetime $dateNow Date |
||
61 | * |
||
62 | * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface|array |
||
63 | */ |
||
64 | public function findExpiredRegistrations($dateNow) |
||
73 | 22 | ||
74 | 8 | /** |
|
75 | * Returns all registrations for the given event with the given constraints |
||
76 | * Constraints are combined with a logical AND |
||
77 | 14 | * |
|
78 | 14 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Event $event Event |
|
79 | * @param array $findConstraints FindConstraints |
||
80 | 14 | * |
|
81 | 4 | * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
|
82 | 4 | */ |
|
83 | 12 | public function findNotificationRegistrations($event, $findConstraints) |
|
119 | |||
120 | /** |
||
121 | * Returns registrations for the given UserRegistrationDemand demand |
||
122 | * |
||
123 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Dto\UserRegistrationDemand $demand |
||
124 | * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
||
125 | 12 | */ |
|
126 | public function findRegistrationsByUserRegistrationDemand($demand) |
||
140 | |||
141 | /** |
||
142 | * Returns all registrations for the given event and where the waitlist flag is as given |
||
143 | * |
||
144 | * @param Event $event |
||
145 | * @param bool $waitlist |
||
146 | * @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface |
||
147 | */ |
||
148 | 10 | public function findByEventAndWaitlist($event, $waitlist = false) |
|
161 | |||
162 | /** |
||
163 | * Sets the displayMode constraint to the given constraints array |
||
164 | * |
||
165 | * @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query Query |
||
166 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Dto\UserRegistrationDemand $demand |
||
167 | * @param array $constraints Constraints |
||
168 | * |
||
169 | * @return void |
||
170 | 10 | */ |
|
171 | protected function setDisplayModeConstraint($query, $demand, &$constraints) |
||
183 | |||
184 | /** |
||
185 | * Sets the storagePage constraint to the given constraints array |
||
186 | * |
||
187 | 10 | * @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query Query |
|
188 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Dto\UserRegistrationDemand $demand |
||
189 | 10 | * @param array $constraints Constraints |
|
190 | 10 | * |
|
191 | 10 | * @return void |
|
192 | 10 | */ |
|
193 | protected function setStoragePageConstraint($query, $demand, &$constraints) |
||
200 | |||
201 | /** |
||
202 | 10 | * Sets the user constraint to the given constraints array |
|
203 | * |
||
204 | 10 | * @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query Query |
|
205 | 10 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Dto\UserRegistrationDemand $demand |
|
206 | 4 | * @param array $constraints Constraints |
|
207 | 4 | * |
|
208 | 2 | * @return void |
|
209 | 4 | */ |
|
210 | 4 | protected function setUserConstraint($query, $demand, &$constraints) |
|
216 | |||
217 | /** |
||
218 | * Sets the ordering to the given query for the given demand |
||
219 | * |
||
220 | * @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query Query |
||
221 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Dto\UserRegistrationDemand $demand |
||
222 | * |
||
223 | * @return void |
||
224 | */ |
||
225 | protected function setOrderingsFromDemand($query, $demand) |
||
235 | } |
||
236 |