| @@ 45-61 (lines=17) @@ | ||
| 42 | * Handle an update the major info command. |
|
| 43 | * @param UpdateMajorInfo $updateMajorInfo |
|
| 44 | */ |
|
| 45 | public function handleUpdateMajorInfo(UpdateMajorInfo $updateMajorInfo) |
|
| 46 | { |
|
| 47 | /** @var Event $event */ |
|
| 48 | $event = $this->offerRepository->load($updateMajorInfo->getItemId()); |
|
| 49 | ||
| 50 | $event->updateMajorInfo( |
|
| 51 | $updateMajorInfo->getTitle(), |
|
| 52 | $updateMajorInfo->getEventType(), |
|
| 53 | $updateMajorInfo->getLocation(), |
|
| 54 | $updateMajorInfo->getCalendar(), |
|
| 55 | $updateMajorInfo->getTheme() |
|
| 56 | ); |
|
| 57 | ||
| 58 | $this->offerRepository->save($event); |
|
| 59 | ||
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * @param UpdateLocation $updateLocation |
|
| 64 | */ |
|
| @@ 225-241 (lines=17) @@ | ||
| 222 | * Handle an update the major info command. |
|
| 223 | * @param UpdateMajorInfo $updateMajorInfo |
|
| 224 | */ |
|
| 225 | public function handleUpdateMajorInfo(UpdateMajorInfo $updateMajorInfo) |
|
| 226 | { |
|
| 227 | ||
| 228 | /** @var Place $place */ |
|
| 229 | $place = $this->offerRepository->load($updateMajorInfo->getItemId()); |
|
| 230 | ||
| 231 | $place->updateMajorInfo( |
|
| 232 | $updateMajorInfo->getTitle(), |
|
| 233 | $updateMajorInfo->getEventType(), |
|
| 234 | $updateMajorInfo->getAddress(), |
|
| 235 | $updateMajorInfo->getCalendar(), |
|
| 236 | $updateMajorInfo->getTheme() |
|
| 237 | ); |
|
| 238 | ||
| 239 | $this->offerRepository->save($place); |
|
| 240 | ||
| 241 | } |
|
| 242 | } |
|
| 243 | ||