| @@ 59-73 (lines=15) @@ | ||
| 56 | /** |
|
| 57 | * {@inheritdoc} |
|
| 58 | */ |
|
| 59 | public function createPlace( |
|
| 60 | Title $title, |
|
| 61 | EventType $eventType, |
|
| 62 | Address $address, |
|
| 63 | CalendarInterface $calendar, |
|
| 64 | Theme $theme = null |
|
| 65 | ) { |
|
| 66 | $id = $this->uuidGenerator->generate(); |
|
| 67 | ||
| 68 | $place = Place::createPlace($id, $title, $eventType, $address, $calendar, $theme, $this->publicationDate); |
|
| 69 | ||
| 70 | $this->writeRepository->save($place); |
|
| 71 | ||
| 72 | return $id; |
|
| 73 | } |
|
| 74 | ||
| 75 | /** |
|
| 76 | * {@inheritdoc} |
|
| @@ 66-88 (lines=23) @@ | ||
| 63 | /** |
|
| 64 | * {@inheritdoc} |
|
| 65 | */ |
|
| 66 | public function createEvent( |
|
| 67 | Title $title, |
|
| 68 | EventType $eventType, |
|
| 69 | Location $location, |
|
| 70 | CalendarInterface $calendar, |
|
| 71 | $theme = null |
|
| 72 | ) { |
|
| 73 | $eventId = $this->uuidGenerator->generate(); |
|
| 74 | ||
| 75 | $event = Event::create( |
|
| 76 | $eventId, |
|
| 77 | $title, |
|
| 78 | $eventType, |
|
| 79 | $location, |
|
| 80 | $calendar, |
|
| 81 | $theme, |
|
| 82 | $this->publicationDate |
|
| 83 | ); |
|
| 84 | ||
| 85 | $this->writeRepository->save($event); |
|
| 86 | ||
| 87 | return $eventId; |
|
| 88 | } |
|
| 89 | ||
| 90 | /** |
|
| 91 | * @inheritdoc |
|